PHPackages                             davekoala/routes-explorer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. davekoala/routes-explorer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

davekoala/routes-explorer
=========================

Laravel package for exploring routes and their complete dependency chains

v1.0.4(9mo ago)03MITPHPPHP ^8.1

Since Jul 23Pushed 9mo agoCompare

[ Source](https://github.com/daveKoala/davekoala-routes-explorer)[ Packagist](https://packagist.org/packages/davekoala/routes-explorer)[ RSS](/packages/davekoala-routes-explorer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (6)Used By (0)

DaveKoala: Laravel Archaeologist
================================

[](#davekoala-laravel-archaeologist)

🔍 **Explore Laravel routes and their complete dependency chains**

Overview
--------

[](#overview)

Once installed open `http://127.0.0.1/dev/routes-explorer`

Laravel Archaeologist is a development tool designed to help new team members and existing developers explore and understand large Laravel applications.

[![Screen shot of routes and graph](resources/views/images/Screenshot%202025-07-16%20at%2010.17.29.png)](resources/views/images/Screenshot%202025-07-16%20at%2010.17.29.png)

It provides a clear, searchable interface to view:

- Routes
- Controllers
- Models
- Middleware
- Traits
- Class relationships

It also visualizes these relationships to make onboarding and refactoring easier.

Why?
----

[](#why)

When joining an existing Laravel project, understanding "what connects to what" can be painful. This tool makes that process easier by giving you immediate visibility into the routing structure and the classes behind it.

### Patterns

[](#patterns)

**How we discover class, traits, middleware, etc**

- Regex matches a pattern in the source code string
- Extract the potential class name from the match
- Build the full class name (usually by prepending App\\Whatever)
- Check if that class actually exists with class\_exists()
- Add to dependencies array if it exists

Here's the general pattern broken down:

```
// The pattern template:

if (preg_match_all('/PATTERN/', $source, $matches)) {
    foreach ($matches[1] as $capturedName) {
        // Build full class name
        $fullClass = "App\\Namespace\\{$capturedName}";
        // Verify it exists
        if (class_exists($fullClass)) {
            $dependencies[] = [
                'class' => $fullClass,
                'pattern' => 'what was matched',
                'usage' => 'type_of_usage'
            ];
        }
    }
}
```

So for example:

- dispatch(new SendEmailJob()) → captures "SendEmailJob" → checks if `App\Jobs\SendEmailJob` exists
- event(new OrderPlaced()) → captures "OrderPlaced" → checks if `App\Events\OrderPlaced` exists
- User::create() → captures "User" → checks if `App\Models\User` exists

The `class_exists()` check is crucial because it prevents false positives. Without it, you might catch things like `dispatch(new DateTime())` and try to analyze `App\Jobs\DateTime` which doesn't exist.

Todo
----

[](#todo)

### House keeping

[](#house-keeping)

- Add configuration for things like 'max depth' list of classes to ignore
- The Patterns in `ClassAnalysisEngine.php` as becoming too many, might be time to refactor
- Test, now I know what it is I am building time to firm up the logic
- Make sure this only runs in `development`mode

### Next steps / feature

[](#next-steps--feature)

- Add functionality to explore classes directly? Form to take full namespace and class name and(?) method?
- How to turn this into a Composer package and publish? Time to show to people?

Installation
------------

[](#installation)

Install via Composer:

```
composer require davekoala/routes-explorer --dev
```

Then visit `http://your-app.local/dev/routes-explorer` in your browser.

Security
--------

[](#security)

This package is designed for development environments only. It includes security middleware that restricts access to development environments (`local`, `development`, `testing`) and requires debug mode to be enabled.

Contributing / Support
----------------------

[](#contributing--support)

- **Issues &amp; Bug Reports**: [GitHub Issues](https://github.com/davidclare/davekoala-routes-explorer/issues)
- **Questions &amp; Discussions**: [GitHub Discussions](https://github.com/davidclare/davekoala-routes-explorer/discussions)
- **Contact**: Feel free to reach out via GitHub for any questions or suggestions

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance59

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

5

Last Release

290d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13595feaf08728be10aebf56008fe838c8cfd323668f4ef06384048a427c21a5?d=identicon)[dave-ac](/maintainers/dave-ac)

---

Top Contributors

[![daveKoala](https://avatars.githubusercontent.com/u/13998944?v=4)](https://github.com/daveKoala "daveKoala (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/davekoala-routes-explorer/health.svg)

```
[![Health](https://phpackages.com/badges/davekoala-routes-explorer/health.svg)](https://phpackages.com/packages/davekoala-routes-explorer)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M683](/packages/barryvdh-laravel-ide-helper)[wnx/laravel-stats

Get insights about your Laravel Project

1.8k1.8M7](/packages/wnx-laravel-stats)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M157](/packages/orchestra-canvas)[zonneplan/laravel-module-loader

Module loader for Laravel

24118.4k](/packages/zonneplan-laravel-module-loader)[dragon-code/pretty-routes

Pretty Routes for Laravel

10058.7k4](/packages/dragon-code-pretty-routes)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)

PHPackages © 2026

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