samturrell / laravel-laroute
Extend aaronlord/laroute package.
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 3
Open Issues: 1
Language:JavaScript
Requires
- lord/laroute: ^2.4
This package is auto-updated.
Last update: 2021-03-08 11:06:24 UTC
README
This package extends the original aaronlord/laroute
package with a more lightweight footprint. It does this by removing route actions and other properties that aren't necessarily required or "safe" to freely expose. This modified functionality is taken from the axn/laravel-laroute
package with additional functionality and even smaller footprint.
Installation
Install via Composer:
composer require samturrell/laroute
In Laravel 5.5 the service provider will automatically get registered.
In older versions of the framework just add the service provider
to the array of providers in config/app.php
:
'providers' => [ // ... SamTurrell\Laroute\ServiceProvider::class, ],
How to use
The readme of the original project (aaronlord/laroute) should provide adequate instructions for use.
The only thing to note is that only the route name related methods and data are available.
In addition, there is a new method in the javascript called currentRoute()
which will return the route you're currently on. This is also available when calling the route()
method when you don't provide a route name.