PHPackages                             langaner/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. langaner/route-priority

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

langaner/route-priority
=======================

Package to add priority to Laravel 5 routes

1.0.1(10y ago)74.4k6[3 issues](https://github.com/langaner/route-priority/issues)[1 PRs](https://github.com/langaner/route-priority/pulls)MITPHPPHP &gt;=5.5.9

Since Mar 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/langaner/route-priority)[ Packagist](https://packagist.org/packages/langaner/route-priority)[ RSS](/packages/langaner-route-priority/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (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

31

—

LowBetter than 66% of packages

Maintenance11

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 90.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 ~183 days

Total

4

Last Release

3211d ago

Major Versions

1.0.1 → 5.3.x-dev2017-03-06

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

5.4.x-devPHP &gt;=5.6.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1975620?v=4)[Alexey Molodov](/maintainers/langaner)[@langaner](https://github.com/langaner)

---

Top Contributors

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

---

Tags

laravelroutepriority

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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