PHPackages                             laravel/ranger - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. laravel/ranger

ActiveLibrary[Framework](/categories/framework)

laravel/ranger
==============

Laravel Ranger is a powerful introspection library for Laravel applications.

v0.1.9(2mo ago)5138.9k↑15.1%8[3 issues](https://github.com/laravel/ranger/issues)3MITPHPPHP ^8.2CI passing

Since Nov 9Pushed 2mo agoCompare

[ Source](https://github.com/laravel/ranger)[ Packagist](https://packagist.org/packages/laravel/ranger)[ Docs](https://github.com/laravel/ranger)[ RSS](/packages/laravel-ranger/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (28)Versions (27)Used By (3)

[![Build Status](https://github.com/laravel/ranger/workflows/tests/badge.svg)](https://github.com/laravel/ranger/actions)[![Total Downloads](https://camo.githubusercontent.com/e9232b2f4d65ac6dfeb65354dffbf715d50aca18ffabbe2742e945e06c011077/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2f72616e676572)](https://packagist.org/packages/laravel/ranger)[![Latest Stable Version](https://camo.githubusercontent.com/e1130bc93f3cff130f8fb5cb24b6cade35d416f454f0b211355094008bfd269a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2f72616e676572)](https://packagist.org/packages/laravel/ranger)[![License](https://camo.githubusercontent.com/a80ef88c80c4e5ec7ab7c0c0867be78b1357fb83c84666569a233cd66e4f7ba2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c61726176656c2f72616e676572)](https://packagist.org/packages/laravel/ranger)

Laravel Ranger
==============

[](#laravel-ranger)

Important

Ranger is currently in Beta, the API is subject (and likely) to change prior to the v1.0.0 release. All notable changes will be documented in the [changelog](./CHANGELOG.md).

Introduction
------------

[](#introduction)

Ranger is a powerful introspection library for Laravel applications. It walks through your codebase and collects detailed information about your application's components, including routes, models, enums, broadcast events, environment variables, and Inertia.js components.

With Ranger, you can register callbacks that fire as each component is discovered, each callback returns a detailed Data Transport Object (DTO) that you can decide what to do with.

### Basic Usage

[](#basic-usage)

```
use Laravel\Ranger\Ranger;
use Laravel\Ranger\Components;
use Illuminate\Support\Collection;

$ranger = app(Ranger::class);

// Register callbacks for individual items
$ranger->onRoute(function (Components\Route $route) {
    echo $route->uri();
});

$ranger->onModel(function (Components\Model $model) {
    foreach ($model->getAttributes() as $name => $type) {
        //
    }
});

$ranger->onEnum(function (Components\Enum $enum) {
    //
});

$ranger->onBroadcastEvent(function (Components\BroadcastEvent $event) {
    //
});

// Or register callbacks for entire collections
$ranger->onRoutes(function (Collection $routes) {
    // Called once all of the routes have been discovered and processed
});

$ranger->onModels(function (Collection $models) {
    // Called once all of the models have been discovered and processed
});

// Walk through the application and trigger all callbacks
$ranger->walk();
```

### What Ranger Collects

[](#what-ranger-collects)

CollectorDescription**Routes**All registered routes with URIs, parameters, HTTP verbs, controllers, validation rules, and possible responses**Models**Eloquent models with their attributes, types, and relationships**Enums**PHP backed enums with their cases and values**Broadcast Events**Events implementing `ShouldBroadcast` with their payloads**Broadcast Channels**Registered broadcast channels**Environment Variables**Variables defined in your `.env` file**Inertia Shared Data**Globally shared Inertia.js props**Inertia Components**Inertia.js page components with their expected propsContributing
------------

[](#contributing)

Thank you for considering contributing to Ranger! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).

Code of Conduct
---------------

[](#code-of-conduct)

In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](https://github.com/laravel/ranger/security/policy) on how to report security vulnerabilities.

License
-------

[](#license)

Laravel Ranger is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance86

Actively maintained with recent releases

Popularity45

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~9 days

Recently: every ~19 days

Total

10

Last Release

62d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/463230?v=4)[Taylor Otwell](/maintainers/taylorotwell)[@taylorotwell](https://github.com/taylorotwell)

---

Top Contributors

[![joetannenbaum](https://avatars.githubusercontent.com/u/2702148?v=4)](https://github.com/joetannenbaum "joetannenbaum (115 commits)")[![taylorotwell](https://avatars.githubusercontent.com/u/463230?v=4)](https://github.com/taylorotwell "taylorotwell (5 commits)")[![JorgeRui](https://avatars.githubusercontent.com/u/29062316?v=4)](https://github.com/JorgeRui "JorgeRui (2 commits)")[![nunomaduro](https://avatars.githubusercontent.com/u/5457236?v=4)](https://github.com/nunomaduro "nunomaduro (1 commits)")[![pascalbaljet](https://avatars.githubusercontent.com/u/8403149?v=4)](https://github.com/pascalbaljet "pascalbaljet (1 commits)")[![mathieutu](https://avatars.githubusercontent.com/u/11351322?v=4)](https://github.com/mathieutu "mathieutu (1 commits)")[![Jasonej](https://avatars.githubusercontent.com/u/43227214?v=4)](https://github.com/Jasonej "Jasonej (1 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (1 commits)")

---

Tags

laravel

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/laravel-ranger/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-ranger/health.svg)](https://phpackages.com/packages/laravel-ranger)
```

###  Alternatives

[laravel/tinker

Powerful REPL for the Laravel framework.

7.4k423.8M1.8k](/packages/laravel-tinker)[laravel/surveyor

Static analysis tool for Laravel applications.

7639.0k7](/packages/laravel-surveyor)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.5k10.6M274](/packages/laravel-boost)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
