sevenshores/artisan-route-find

Artisan Console Command route:find

v1.1.0 2016-10-08 16:31 UTC

This package is not auto-updated.

Last update: 2024-12-21 21:14:15 UTC


README

I've come across working on some Laravel-based apps that have probably 100+ routes and it can become a bit annoying to quickly find things you are looking for.

artisan route:list + grep is fine, mostly, but I ended up making a bash function to do it, as well as trimming extra whitespace from the results. Then I thought "Hey, it would be nice if there was something built in to the framework." Something like artisan route:find

So, here it is, a proof-of-concept kind of thing.

Install and Set-up

composer require sevenshores/artisan-route-find

Register the command by adding it to app/Console/Kernel:

protected $commands = [

    \SevenShores\RouteFinder\RouteFindCommand::class,

];

Usage

and now you can do something like:

php artisan route:find api/files

and to trim extra whitespace from the results:

php artisan route:find api/files --trim