laravel/folio
Laravel Folio is a page-based router for Laravel that lets you define routes by creating files, keeping routing simple and organized. Ideal for building pages quickly with less boilerplate, backed by official Laravel documentation and support.
routes/web.php) with a file-system and database-driven approach. This is ideal for:
resources/pages/) or database entries (folio_pages table).composer require + php artisan folio:install command.@route() directives and route() helpers (e.g., route('home')).folio_pages table) with optional extensions (e.g., folio_page_versions for A/B testing).ViewMatched events for extensibility.route:cache, but dynamic page generation may impact cold starts.resources/pages/; optimize with php artisan folio:prune for large projects./pages/{slug}) must align with SEO strategies (use route('page', ['slug' => 'about']) for consistency).Testbench support simplifies unit/feature testing for page routes.@route() directives and route() helpers.ViewMatched events for custom logic (e.g., analytics, A/B testing).folio:install, folio:list, folio:prune, etc.Folio\Page model) or raw queries.Testbench and Pest/PHPUnit.Phase 1: Pilot Project
/about page) to Folio.composer require laravel/folio.php artisan folio:install to generate resources/pages/ and database schema.resources/pages/about.blade.php) or database entry.php artisan folio:list.@route('home')) and URL generation.Phase 2: Hybrid Routing
Route::middleware(['folio'])->group(...)).RouteServiceProvider to prioritize Folio routes.folio:prune to clean up unused filesystem routes.Phase 3: Full Adoption
routes/web.php definitions.folio_pages table or resources/pages/.php artisan route:cache).Page model or service provider for custom logic.| Task | Priority | Dependencies | Tools/Commands |
|---|---|---|---|
| Install Folio | High | Laravel 11+ | composer require, folio:install |
| Migrate pilot page | High | Database schema | php artisan migrate |
| Test Blade directives | High | Pilot page | @route(), route() helpers |
| Hybrid routing setup | Medium | Middleware configuration | Route::middleware(['folio']) |
| Route caching | Medium | Stable routing | php artisan route:cache |
| Admin UI integration | Low | Nova or custom admin panel | Nova Tool or custom controller |
| Performance benchmark | Low | High-traffic routes | Laravel Debugbar, Blackfire |
routes/web.php.folio:list, folio:prune) simplify debugging.resources/pages/ require route cache invalidation (php artisan route:clear).folio_pages must be version-controlled.resources/pages/ permissions and route caching.php artisan folio:list to debug overlapping paths.@route() syntax is correct (fixed in v1.1.18).ViewMatched events; log these for debugging.php artisan route:cache).resources/pages/ directories may slow initial requests; use folio:prune to optimize.folio_pages.slug for fast lookups.How can I help you explore Laravel packages today?