Download the PHP package amir-hossein5/laravel-routin without Composer
On this page you can find all versions of the php package amir-hossein5/laravel-routin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download amir-hossein5/laravel-routin
More information about amir-hossein5/laravel-routin
Files in amir-hossein5/laravel-routin
Package laravel-routin
Short Description filters laravel application routes
License MIT
Informations about the package laravel-routin
:warning: This package just finds those routes, that have name.
This package provides searching between laravel application routes. For example when user's going to create a menu item, have to link that to a page, but instead of writing manually you can show your intended routes to select:
Output will be those routes uri, that haven't any parameter and verb of GET:
- Installation
- Filters
- Getters
Prerequisites
- Laravel
- PHP 8
Installation
Usage
Filters
filter | description |
---|---|
uriStartsWith( string ) | where uri (/users/create) starts with something (here starts with u or users) |
uriEndsWith( string ) | where uri (/users/create) ends with something (here ends with e or create) |
nameStartsWith( string ) | where name (users.create) starts with something (here starts with u or user) |
nameEndsWith( string ) | where name (users.create) ends with something (here ends with e or create) |
withoutParameter() | where route doesn't have any parameter |
method( string ) | where route's verb is $mehod |
Notice: There is no order for methods and but you have to use ::routes() at the begining.
Getters
After filtering routes you need to get them by these methods:
Getting routes manually
See available methods in https://laravel.com/api/8.x/Illuminate/Routing/Route.html
get()
Returns array with key of name and value of laravel's Illuminate\Routing\Route object.
getUri()
Returns array with value of routes uri.
getParameters()
Returns array with key of name and value, array of parameters.
getName()
Returns array with value of route's name.
License
License