samturrell/laroute

This package is abandoned and no longer maintained. No replacement package was suggested.

Extend aaronlord/laroute package.

Installs: 75 606

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 3

Open Issues: 0

Language:JavaScript

2.0.0 2021-03-08 11:03 UTC

This package is auto-updated.

Last update: 2021-11-08 12:31:30 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.