PHPackages                             snizhok/route-priority - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. snizhok/route-priority

ActiveLibrary[Framework](/categories/framework)

snizhok/route-priority
======================

Package to add priority to Laravel 5 routes

1.0.1(10y ago)02281MITPHPPHP &gt;=5.5.9

Since Mar 15Pushed 6y ago1 watchersCompare

[ Source](https://github.com/snizhok/route-priority)[ Packagist](https://packagist.org/packages/snizhok/route-priority)[ RSS](/packages/snizhok-route-priority/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (5)Used By (0)

Package to add priority to Laravel 5 routes
-------------------------------------------

[](#package-to-add-priority-to-laravel-5-routes)

[![Latest Stable Version](https://camo.githubusercontent.com/7847bc29761269c78bca7c0de91a31f7a9086a1215ca85da44644862f951b44c/68747470733a2f2f706f7365722e707567782e6f72672f6c616e67616e65722f726f7574652d7072696f726974792f762f737461626c65)](https://packagist.org/packages/langaner/route-priority)[![Total Downloads](https://camo.githubusercontent.com/257aee35b5a70e1610370f1ff9bf8fbb25f440a6076ea0cb30a4a6bd84fcabcf/68747470733a2f2f706f7365722e707567782e6f72672f6c616e67616e65722f726f7574652d7072696f726974792f646f776e6c6f616473)](https://packagist.org/packages/langaner/route-priority)[![Latest Unstable Version](https://camo.githubusercontent.com/81df9d61c9db86642c4de316c9cac0c3c6843b302bec3983dc99676a5a93ff55/68747470733a2f2f706f7365722e707567782e6f72672f6c616e67616e65722f726f7574652d7072696f726974792f762f756e737461626c65)](https://packagist.org/packages/langaner/route-priority)[![License](https://camo.githubusercontent.com/42eb1336cd8bd2baf6445b98ccd8a7e294d1bf39bba9c33b4bdca82ce2ac585c/68747470733a2f2f706f7365722e707567782e6f72672f6c616e67616e65722f726f7574652d7072696f726974792f6c6963656e7365)](https://packagist.org/packages/langaner/route-priority)

### Installation

[](#installation)

1. Add `langaner/route-priority` to `composer.json`.

    "langaner/route-priority": "dev-master"

2)Run `composer update` to pull down the latest version of the package.

3)Now open up `app/config/app.php` and add the service provider to your `providers` array.

```
Langaner\RoutePriority\RoutePriorityServiceProvider::class,

```

4)Add the trait to `App\Http\Kernel`

```
use \Langaner\RoutePriority\RouterTrait;

```

### Usage

[](#usage)

Change routes priority:

```
Route::get('test', ['uses' => 'Controller@showAction'])->setPriority(100);
```

### Default Priority

[](#default-priority)

Default priority is `50`. Higher priority - values from 50 and above, lower priority - `49` and below.

### Usage example

[](#usage-example)

```
Route::get('/test/{slug}', …);
Route::get('/test/hello', …);
```

In this example second route will not work. Add priority 0 to the first route will fix the error:

```
Route::get('/test/{slug}', …)->setPriority(0);
Route::get('/test/hello', …);
```

Second route now has higher priority.

### Group priority

[](#group-priority)

You can put priority to groups:

```
Route::group(['prefix' => 'test-group', 'priority' => 10], function () {
	Route::get('/test/hello', function () {
	    return 'First group';
	});
});

Route::group(['prefix' => 'test-group', 'priority' => 20], function () {
	Route::get('/test/hello', function () {
	    return 'Second group';
	});
});
```

Second group has higher priority then First group. All routes in the group will has the same priority as the group.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 76.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~385 days

Total

4

Last Release

2551d ago

Major Versions

1.0.1 → 5.3.x-dev2018-01-04

PHP version history (2 changes)1.0PHP &gt;=5.5.9

5.3.x-devPHP &gt;=5.6.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/b3233706dc12d1ee89970da8621417295c6b3f5d75504bd7e27d66342b7177b0?d=identicon)[snizhok](/maintainers/snizhok)

---

Top Contributors

[![langaner](https://avatars.githubusercontent.com/u/1975620?v=4)](https://github.com/langaner "langaner (10 commits)")[![snizhok](https://avatars.githubusercontent.com/u/12058996?v=4)](https://github.com/snizhok "snizhok (2 commits)")[![sebastienheyd](https://avatars.githubusercontent.com/u/5470423?v=4)](https://github.com/sebastienheyd "sebastienheyd (1 commits)")

---

Tags

laravelroutepriority

### Embed Badge

![Health badge](/badges/snizhok-route-priority/health.svg)

```
[![Health](https://phpackages.com/badges/snizhok-route-priority/health.svg)](https://phpackages.com/packages/snizhok-route-priority)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M672](/packages/laravel-socialite)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M224](/packages/laravel-horizon)[laravel/ui

Laravel UI utilities and presets.

2.7k134.9M597](/packages/laravel-ui)[laravel/sail

Docker files for running a basic Laravel application.

1.9k186.9M1.0k](/packages/laravel-sail)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[stancl/tenancy

Automatic multi-tenancy for your Laravel application.

4.3k6.6M40](/packages/stancl-tenancy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
