Download the PHP package khalyomede/laravel-route-find without Composer
On this page you can find all versions of the php package khalyomede/laravel-route-find. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download khalyomede/laravel-route-find
More information about khalyomede/laravel-route-find
Files in khalyomede/laravel-route-find
Package laravel-route-find
Short Description Find the route name and file path with number from any real URLs.
License MIT
Informations about the package laravel-route-find
Laravel Route Find
Find the route name and file path with number from any real URLs.
Summary
- About
- Features
- Installation
- Examples
- Compatibility table
- Tests
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
- 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 (https://example.com/user) or path (/user)
- You can use an optional argument to ask for a specific HTTP method and find the correct controller method
Installation
The command line will automatically be registered without any other manipulation. Check it works correctly by running:
Examples
- 1. Find a route from a path
- 2. Precise the HTTP method
- 3. Find using a full URL
1. Find a route from a path
In this example, we will try to find the route info from an URL.
Tips: On VSCode, hold [CTRL] and left clic on the file path to go directly to the file.
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.
3. Find using a full URL
In this example, we will just copy/paste the URL from our browser to find the route.
Compatibility table
Package version | Laravel version | PHP version | Compatible |
---|---|---|---|
0.1.0 | 8.* | 8.* | ✅ |
8.* | 7.* | ❌ |