endkind/routes

Automatic route loader for Laravel projects

0.0.1 2025-05-22 21:26 UTC

This package is auto-updated.

Last update: 2025-08-22 22:08:05 UTC


README

A minimal Composer package to automatically load route files from routes/routes in Laravel. Includes convenient artisan commands to initialize and create route files.

🎞️ Installation

composer require endkind/routes

⚙️ Features

  • Automatically loads all .php files in routes/routes/
  • php artisan route:init to create the routes/routes folder and an example health.php
  • php artisan make:route <name> to quickly generate a route file template with a prefix

📂 Usage

Initialize folder

php artisan route:init

Creates:

routes/routes/health.php

Create a new route file

php artisan make:route dashboard

Creates:

<?php

use Illuminate\Support\Facades\Route;

Route::prefix('/dashboard')->group(function() {
    //
});

🔧 How it works

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.

🧚 Requirements

  • PHP 8.1 or higher
  • Laravel 10, 11, or 12

📄 License

MIT License © Endkind