Laravel Folio is a page-based router for Laravel that maps Blade files in a resources/views/pages directory directly to application routes — no more manually registering routes in web.php for simple pages.
resources/views/pages/about.blade.php → /about
resources/views/pages/users/[id].blade.php → /users/{id}
composer require laravel/folio
php artisan folio:install
Folio pages support middleware via the middleware() function at the top of any Blade file, and route model binding works automatically when parameter names match Eloquent model names.
<?php
use function Laravel\Folio\{middleware, name};
middleware(['auth', 'verified']);
name('dashboard');
?>
<x-layouts.app>
Welcome to your dashboard.
</x-layouts.app>
All Comments