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(11mo ago)03MITPHPPHP ^8.1

Since Jul 23Pushed 11mo 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 today

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

29

—

LowBetter than 57% of packages

Maintenance51

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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

345d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/36577810?v=4)[dave-ac](/maintainers/dave-ac)[@dave-ac](https://github.com/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

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/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.5M588](/packages/laravel-boost)[laravel/ai

The official AI SDK for Laravel.

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

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[laravel/surveyor

Static analysis tool for Laravel applications.

86121.4k11](/packages/laravel-surveyor)

PHPackages © 2026

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