A FIELD GUIDE TO LARAVEL · VOLUME II · THE ECOSYSTEM
ENTRY II.30 · PAGE ROUTING
Folio
Laravel\Folio · Package · first recorded 25 July 2023, v1.0.0-beta.1 on Packagist
Page-based routing. A Blade file in resources/views/pages is a route: the path is the URL, square brackets in the filename are parameters, and a model name in them is route model binding. The directory listing is the routes file.
Specification
Kind Package, in-process; a route resolver mounted on a directory
Interface Folio::path()->uri(); render(), name(), middleware() inside a page
Client Any browser; pages are Blade, so Livewire and Volt sit inside them
Installed by composer require laravel/folio · folio:install
Voice folio:list · folio:page
Scales by route:cache covers Folio pages; several mounted paths, one per area
Range Cloud: yes. Files on disk, nothing resident
Forge, VPS: yes, the same files
Vapor: yes. Blade files ship with the build
Neighbours
routes/web.php stays explicit beside it: Folio adds routes, it does not replace them. Livewire 4 page components also live in resources/views/pages, routed with Route::livewire. Volt puts a component's PHP and Blade in one file, and Volt in a Folio page is the pairing. The file is the route.
Field marks
resources/views/pages/
app/Providers/FolioServiceProvider.php
[User].blade.php in a filename
use function Laravel\Folio\render
Fig. II.30.1 · one file, one route, exploded
Parts
1 Mount. Folio::path(resource_path('views/pages'))->uri('/') in the service provider; several mounts, one per area.
2 The file. pages/users/[User].blade.php answers /users/1; index.blade.php answers the directory root.
3 Segment. [id] captures one segment, [...ids] the rest as an array; [Post:slug] binds on a column other than id.
4 Binding. A model name in brackets resolves through route model binding; withTrashed() admits soft-deleted rows.
5 Page functions. middleware([...]), name('users.show') and render(fn (View $view, User $user) => ...) in a PHP block on top.
6 Route cache. Folio listens for route:cache, so page definitions and names are cached with the rest.
Hidden joinery
Middleware on a mount is keyed by URL pattern, so 'admin/*' can carry auth for a whole subtree, and a closure can sit in the list. Folio::domain('{account}.example.com') captures part of the host as a page variable. On Windows the model key separator is a hyphen, [Post-slug], since a colon cannot sit in a filename.
Every line checked against the Folio docs, Livewire 4 and Volt docs and Packagist on 2026-10-08.
TITLE
Folio · one file, one route
SOURCES
laravel.com/docs/13.x/folio · github.com/laravel/folio · packagist.org/packages/laravel/folio · livewire.laravel.com/docs/4.x/components · livewire.laravel.com/docs/3.x/volt · laravel.com/docs/13.x/routing
STATUS
Verified · 2026-10-08
SHEET
II.30 of 48
REV
A · 2026-10-08
DRAWN
BS
FINISH
All faces, including the back