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.2.5(1mo ago)63120.6k—4.1%11[2 issues](https://github.com/laravel/ranger/issues)[1 PRs](https://github.com/laravel/ranger/pulls)4MITPHPPHP ^8.2CI passing

Since Nov 9Pushed 1w 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 2d ago

READMEChangelog (10)Dependencies (42)Versions (46)Used By (4)

[![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

57

—

FairBetter than 98% of packages

Maintenance94

Actively maintained with recent releases

Popularity48

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.3% 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 ~8 days

Total

19

Last Release

46d 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 (136 commits)")[![taylorotwell](https://avatars.githubusercontent.com/u/463230?v=4)](https://github.com/taylorotwell "taylorotwell (5 commits)")[![nunomaduro](https://avatars.githubusercontent.com/u/5457236?v=4)](https://github.com/nunomaduro "nunomaduro (3 commits)")[![JorgeRui](https://avatars.githubusercontent.com/u/29062316?v=4)](https://github.com/JorgeRui "JorgeRui (2 commits)")[![benddailey](https://avatars.githubusercontent.com/u/593036?v=4)](https://github.com/benddailey "benddailey (1 commits)")[![levikl](https://avatars.githubusercontent.com/u/28932451?v=4)](https://github.com/levikl "levikl (1 commits)")[![mathieutu](https://avatars.githubusercontent.com/u/11351322?v=4)](https://github.com/mathieutu "mathieutu (1 commits)")[![pascalbaljet](https://avatars.githubusercontent.com/u/8403149?v=4)](https://github.com/pascalbaljet "pascalbaljet (1 commits)")[![jradtilbrook](https://avatars.githubusercontent.com/u/6128798?v=4)](https://github.com/jradtilbrook "jradtilbrook (1 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![Jasonej](https://avatars.githubusercontent.com/u/43227214?v=4)](https://github.com/Jasonej "Jasonej (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/surveyor

Static analysis tool for Laravel applications.

86121.4k13](/packages/laravel-surveyor)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[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.5k21.5M594](/packages/laravel-boost)[laravel/cashier

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

2.6k29.9M146](/packages/laravel-cashier)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)

PHPackages © 2026

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