PHPackages                             khalyomede/laravel-route-find - 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. [CLI &amp; Console](/categories/cli)
4. /
5. khalyomede/laravel-route-find

ActiveLibrary[CLI &amp; Console](/categories/cli)

khalyomede/laravel-route-find
=============================

Find the route name and file path with number from any real URLs.

v0.1.0(4y ago)04MITPHP

Since Sep 4Pushed 4y ago1 watchersCompare

[ Source](https://github.com/khalyomede/laravel-route-find)[ Packagist](https://packagist.org/packages/khalyomede/laravel-route-find)[ RSS](/packages/khalyomede-laravel-route-find/feed)WikiDiscussions master Synced 2d ago

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

Laravel Route Find
==================

[](#laravel-route-find)

Find the route name and file path with number from any real URLs.

Summary
-------

[](#summary)

- [About](#about)
- [Features](#features)
- [Installation](#installation)
- [Examples](#examples)
- [Compatibility table](#compatibility-table)
- [Tests](#tests)

About
-----

[](#about)

Sometimes I loose a few seconds to figure out where is my controller for a given route. It gets worse when I use Route::resource, or any route grouping method, which makes it hard to just find the declared route.

I found it could be cool to just give a "real" URL, find the correct controller.

Features
--------

[](#features)

- A command line which takes your "real" URL in parameter, and find the controller file path with the number of the line (to let you clic and go to the file from your code editor)
- Works both with "full" URL () or path (/user)
- You can use an optional argument to ask for a specific HTTP method and find the correct controller method

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

[](#installation)

```
composer require --dev khalyomede/laravel-route-find
```

The command line will automatically be registered without any other manipulation. Check it works correctly by running:

```
khalyomede@pc > php artisan route:find --help
```

Examples
--------

[](#examples)

- [1. Find a route from a path](#1-find-a-route-from-a-path)
- [2. Precise the HTTP method](#2-precise-the-http-method)
- [3. Find using a full URL](#3-find-using-a-full-url)

### 1. Find a route from a path

[](#1-find-a-route-from-a-path)

In this example, we will try to find the route info from an URL.

```
khalyomede@pc > php artisan route:find /user/45/cart/27
+------------------------------------------------+-------------------------+----------------+-------------+
| controller                                     | path                    | name           | middlewares |
+------------------------------------------------+-------------------------+--------------- +-------------+
| app/Http/Controllers/UserCartController.php:54 | user/{user}/cart/{cart} | user.cart.show | web, auth   |
+------------------------------------------------+-------------------------+----------------+-------------+
```

Tips: On VSCode, hold \[CTRL\] and left clic on the file path to go directly to the file.

### 2. Precise the HTTP method

[](#2-precise-the-http-method)

By default, this command will assume you find a route attached to the GET HTTP method. In this example we will tell the command to find a POST route instead.

```
khalyomede@pc > php artisan route:find /user/45/cart --method POST
+------------------------------------------------+------------------+-----------------+-------------+
| controller                                     | path             | name            | middlewares |
+------------------------------------------------+------------------+-----------------+-------------+
| app/Http/Controllers/UserCartController.php:24 | user/{user}/cart | user.cart.store | web, auth   |
+------------------------------------------------+------------------+-----------------+-------------+
```

### 3. Find using a full URL

[](#3-find-using-a-full-url)

In this example, we will just copy/paste the URL from our browser to find the route.

```
khalyomede@pc > php artisan route:find http://example.com/user/45/cart/27
+------------------------------------------------+-------------------------+----------------+-------------+
| controller                                     | path                    | name           | middlewares |
+------------------------------------------------+-------------------------+--------------- +-------------+
| app/Http/Controllers/UserCartController.php:54 | user/{user}/cart/{cart} | user.cart.show | web, auth   |
+------------------------------------------------+-------------------------+----------------+-------------+
```

Compatibility table
-------------------

[](#compatibility-table)

Package versionLaravel versionPHP versionCompatible0.1.08.\*8.\*✅8.\*7.\*❌Tests
-----

[](#tests)

```
composer install
composer install-checker
composer run test
composer run analyse
composer run lint
composer run check
composer outdated --direct
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Unknown

Total

1

Last Release

1763d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15908747?v=4)[Anwar](/maintainers/khalyomede)[@khalyomede](https://github.com/khalyomede)

---

Top Contributors

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

---

Tags

command-linefindlaravellaravel-packagepathrouteurl

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/khalyomede-laravel-route-find/health.svg)

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

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[ronasit/laravel-entity-generator

Provided console command for generating entities.

2053.1k](/packages/ronasit-laravel-entity-generator)[api-platform/laravel

API Platform support for Laravel

58171.4k14](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.9k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

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