A minimal Composer package to automatically load route files from routes/routes in Laravel.
Includes convenient artisan commands to initialize and create route files.
composer require endkind/routes- Automatically loads all
.phpfiles inroutes/routes/ php artisan route:initto create theroutes/routesfolder and an examplehealth.phpphp artisan make:route <name>to quickly generate a route file template with a prefix
php artisan route:initCreates:
routes/routes/health.php
php artisan make:route dashboardCreates:
<?php
use Illuminate\Support\Facades\Route;
Route::prefix('/dashboard')->group(function() {
//
});This package registers a Laravel service provider that automatically scans the routes/routes folder and loads every .php file using the default web middleware group.
- PHP 8.1 or higher
- Laravel 10, 11, or 12
MIT License © Endkind