PHPackages                             furkankufrevi/laravel-route-linter - 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. furkankufrevi/laravel-route-linter

ActiveLibrary

furkankufrevi/laravel-route-linter
==================================

Static analysis for Laravel routes. Detects missing middleware, unused named routes, duplicate URIs, missing controller methods, and more.

00PHPCI passing

Since Mar 16Pushed 1mo agoCompare

[ Source](https://github.com/furkankufrevi/laravel-route-linter)[ Packagist](https://packagist.org/packages/furkankufrevi/laravel-route-linter)[ RSS](/packages/furkankufrevi-laravel-route-linter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Route Linter
====================

[](#laravel-route-linter)

Static analysis for your Laravel routes. Detects missing controller methods, duplicate URIs, duplicate names, missing middleware, and unnamed routes.

Installation
------------

[](#installation)

```
composer require furkankufrevi/laravel-route-linter --dev
```

The service provider is auto-discovered. To publish the config:

```
php artisan vendor:publish --tag=route-linter-config
```

Usage
-----

[](#usage)

```
php artisan route:lint
```

Run a specific analyzer only:

```
php artisan route:lint --analyzer=duplicate_uris
```

Example Output
--------------

[](#example-output)

```
Analyzing 42 route(s)...

  ERROR  Method 'destroy' not found in App\Http\Controllers\UserController.
         DELETE|HEAD api/users/{user}
  WARN   Duplicate route URI registered (first seen pointing to App\Http\Controllers\PostController@index).
         GET|HEAD api/posts
  WARN   Route matches 'api/*' but is missing required middleware 'auth:sanctum'.
         GET|HEAD api/public/feed
  INFO   Route has no name. Consider adding ->name() for URL generation.
         POST|HEAD api/webhooks/stripe

  Found 1 error(s), 2 warning(s), 1 info(s).

```

Analyzers
---------

[](#analyzers)

AnalyzerLevelWhat it detects`missing_controller_methods`ErrorController class or method doesn't exist`duplicate_uris`WarningSame HTTP method + URI registered more than once`duplicate_names`ErrorMultiple routes sharing the same name`missing_middleware`WarningRoutes matching a pattern but missing required middleware`unnamed_routes`InfoController routes without a `->name()`Configuration
-------------

[](#configuration)

```
// config/route-linter.php

return [
    // Enable/disable individual analyzers
    'analyzers' => [
        'missing_controller_methods' => true,
        'duplicate_uris'             => true,
        'duplicate_names'            => true,
        'missing_middleware'         => true,
        'unnamed_routes'             => true,
    ],

    // Enforce middleware on route patterns
    'required_middleware' => [
        'api/*'   => ['auth:sanctum'],
        'admin/*' => ['auth', 'admin'],
    ],

    // Exclude routes from linting
    'exclude' => [
        '_ignition/*',
        'sanctum/*',
        'telescope/*',
        'horizon/*',
    ],
];
```

CI Integration
--------------

[](#ci-integration)

Add to your CI pipeline to catch route issues before deployment:

```
- run: php artisan route:lint
```

The command exits with code 1 if any errors are found, making it CI-friendly.

License
-------

[](#license)

MIT

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance58

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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/b66a7a56cce090d1bdc1e83e0f8e2e2ed1f05129e6f735ffcc69afb39cff60a3?d=identicon)[furkankufrevi](/maintainers/furkankufrevi)

---

Top Contributors

[![furkankufrevi](https://avatars.githubusercontent.com/u/46204100?v=4)](https://github.com/furkankufrevi "furkankufrevi (1 commits)")

### Embed Badge

![Health badge](/badges/furkankufrevi-laravel-route-linter/health.svg)

```
[![Health](https://phpackages.com/badges/furkankufrevi-laravel-route-linter/health.svg)](https://phpackages.com/packages/furkankufrevi-laravel-route-linter)
```

PHPackages © 2026

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