PHPackages                             vildanbina/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. vildanbina/route-priority

ActiveLibrary[Framework](/categories/framework)

vildanbina/route-priority
=========================

Package to add priority to Laravel 7 routes

011PHP

Since Aug 30Pushed 4y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Package to add priority to Laravel 7 routes
-------------------------------------------

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

[![Latest Stable Version](https://camo.githubusercontent.com/47f1c57444491a74df94b7c94b8f15f1d63afd3c207a7fb4026f3f88293b42fa/68747470733a2f2f706f7365722e707567782e6f72672f76696c64616e62696e612f726f7574652d7072696f726974792f762f737461626c65)](https://packagist.org/packages/vildanbina/route-priority)[![Total Downloads](https://camo.githubusercontent.com/7d81cb37a8d8d1d6708fccdd498b2876eaf7a9a4c09e515c0c3063763d47b41d/68747470733a2f2f706f7365722e707567782e6f72672f76696c64616e62696e612f726f7574652d7072696f726974792f646f776e6c6f616473)](https://packagist.org/packages/vildanbina/route-priority)[![Latest Unstable Version](https://camo.githubusercontent.com/8975be3e017ef76eedc76d11daebcb945517242114ea5e5e25e430ea078b6e5d/68747470733a2f2f706f7365722e707567782e6f72672f76696c64616e62696e612f726f7574652d7072696f726974792f762f756e737461626c65)](https://packagist.org/packages/vildanbina/route-priority)[![License](https://camo.githubusercontent.com/408a8bc1a6df7bc4179aa9e42f647c5a2de7e9c87aadf0cc2e26634ca2ded2ef/68747470733a2f2f706f7365722e707567782e6f72672f76696c64616e62696e612f726f7574652d7072696f726974792f6c6963656e7365)](https://packagist.org/packages/vildanbina/route-priority)

### Installation

[](#installation)

You can install the package via composer:

```
composer require vildanbina/route-priority
```

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

```
vildanbina\RoutePriority\RoutePriorityServiceProvider::class,

```

Add the trait to `App\Http\Kernel`

```
use \vildanbina\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

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5cd0156aac23b34c36c7e291fa0d655a6bd0ceecef941ba458e56f66854536e0?d=identicon)[vildanbina](/maintainers/vildanbina)

---

Top Contributors

[![vildanbina](https://avatars.githubusercontent.com/u/51203303?v=4)](https://github.com/vildanbina "vildanbina (3 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M294](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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