Download the PHP package dragon-code/laravel-route-names without Composer
On this page you can find all versions of the php package dragon-code/laravel-route-names. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dragon-code/laravel-route-names
More information about dragon-code/laravel-route-names
Files in dragon-code/laravel-route-names
Package laravel-route-names
Short Description Automatic generation of route names
License MIT
Informations about the package laravel-route-names
Auto Route Names for Laravel
Installation
To get the latest version of Laravel Route Names
, simply require the project using Composer:
Next, replace Illuminate\Foundation\Application
with DragonCode\LaravelRouteNames\Application
in the bootstrap/app.php
file.
You can now list the routes, for example by calling the php artisan route:list
command or by using
the dragon-code/pretty-routes
package.
Using
This is all. Now you don't have to specify route names. Now the route names will be generated automatically based on the final URL of your project.
All previously specified route names in the application will be ignored.
Compatible with all package solutions for expanding the list of routes.
Also, Laravel Idea support coming soon.
Since route names are generated at the time they are received, we recommend using route caching in production:
Base Routes
Method | Url | Name | Helper |
---|---|---|---|
GET, HEAD | / |
index |
route('index') |
POST | / |
store |
route('store') |
PUT | / |
update |
route('update') |
DELETE | / |
destroy |
route('destroy') |
PATCH | / |
patch |
route('patch') |
OPTIONS | / |
options |
route('options') |
GET, HEAD | /pages |
pages.index |
route('pages.index') |
POST | /pages |
pages.store |
route('pages.store') |
PUT | /pages/123 |
pages.update |
route('pages.update') |
DELETE | /pages/123 |
pages.destroy |
route('pages.destroy') |
PATCH | /pages/123 |
pages.patch |
route('pages.patch') |
OPTIONS | /pages/123 |
pages.options |
route('pages.options') |
Resource Routes
Method | Url | Name | Helper |
---|---|---|---|
GET, HEAD | /authors/123/photos |
authors.photos.index |
route('authors.photos.index') |
GET, HEAD | /authors/123/photos/create |
authors.photos.create |
route('authors.photos.create') |
POST | /authors/123/photos |
authors.photos.store |
route('authors.photos.store') |
GET | /authors/123/photos/{photo} |
authors.photos.show |
route('authors.photos.show') |
GET | /authors/123/photos/{photo}/edit |
authors.photos.edit |
route('authors.photos.edit') |
PUT | /authors/123/photos/{photo} |
authors.photos.update |
route('authors.photos.update') |
PATCH | /authors/123/photos/{photo} |
authors.photos.patch |
route('authors.photos.patch') |
DELETE | /authors/123/photos/{photo} |
authors.photos.destroy |
route('authors.photos.destroy') |
API Resource Routes
Method | Url | Name | Helper |
---|---|---|---|
GET, HEAD | /authors/123/photos |
authors.photos.index |
route('authors.photos.index') |
POST | /authors/123/photos |
authors.photos.store |
route('authors.photos.store') |
GET | /authors/123/photos/{photo} |
authors.photos.show |
route('authors.photos.show') |
PUT | /authors/123/photos/{photo} |
authors.photos.update |
route('authors.photos.update') |
PATCH | /authors/123/photos/{photo} |
authors.photos.patch |
route('authors.photos.patch') |
DELETE | /authors/123/photos/{photo} |
authors.photos.destroy |
route('authors.photos.destroy') |
List of exclusions
By publishing a configuration file with the artisan command, you can explicitly specify a mask of route names that do not need to be translated:
Exceptions
Result
Before:
After:
License
This package is licensed under the MIT License.
All versions of laravel-route-names with dependencies
fig/http-message-util Version ^1.1
illuminate/routing Version ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0