2017 © Pedro Peláez
 

library route-priority

Package to add priority to Laravel routes

image

sleeping-owl/route-priority

Package to add priority to Laravel routes

  • Thursday, February 5, 2015
  • by sleeping-owl
  • Repository
  • 1 Watchers
  • 5 Stars
  • 229 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 1 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Package to add priority to Laravel routes

Latest Stable Version License, (*1)

Installation

Add sleeping-owl/route-priority to composer.json., (*2)

"sleeping-owl/route-priority": "1.*"

Run composer update to pull down the latest version of the package. Now open up app/config/app.php and add the service provider to your providers array., (*3)

'providers' => array(
    'SleepingOwl\RoutePriority\RoutePriorityServiceProvider'
)

That's it. You now have some enhanced functionality available to your routes., (*4)

Usage

Now you can change your routes priority:, (*5)

Route::get('my-route', ['uses' => 'MyController@myAction'])->setPriority(100);

Priority is integer value., (*6)

Default Priority

Default priority is 50 - already registered routes count. So if you want higher priority - use values from 50 and above, lower priority - 10 and below., (*7)

Example

Route::get('/user/{wildcard}', …);
Route::get('/user/settings', …);

This code will register two routes. With default Laravel behaviour second route will not work. Just add priority to the first route to fix the error:, (*8)

Route::get('/user/{wildcard}', …)->setPriority(0);
Route::get('/user/settings', …);

Second route now has higher priority and will work., (*9)

Support Library

You can donate in BTC: 13k36pym383rEmsBSLyWfT3TxCQMN2Lekd, (*10)

Package was written by Sleeping Owl for the Laravel framework and is released under the MIT License. See the LICENSE file for details., (*11)

The Versions

05/02 2015

dev-master

9999999-dev

Package to add priority to Laravel routes

  Sources   Download

MIT

The Requires

 

laravel route order priority

05/02 2015

1.1.0

1.1.0.0

Package to add priority to Laravel routes

  Sources   Download

MIT

The Requires

 

laravel route order priority

03/02 2015

1.0.0

1.0.0.0

Package to add priority to Laravel routes

  Sources   Download

MIT

The Requires

 

laravel route order priority