Laravel Volt / Folio Beta 5 is out, now with named routes
Published on by Eric L. Barnes
Nuno Maduro just announced on platform X that Volt / Folio beta 5 is now released.
Folio’s Route Naming Feature:
One of the headlining features of this release is Folio's introduction of the "name" function. It's a great addition as it allows you to give custom names to your routes. Naming routes enhances readability, aids in debugging, and improves overall navigation in projects.
Here's how you can define a name right within the component:
<?php // pages/dashboard.blade.phpuse function Laravel\Folio\{name}; name('dashboard'): ?>
When working on larger projects or collaborating with a team, referring to routes using their specific names will make route and file changes much more streamlined.
Enhanced Volt Blade Directives:
With Beta 5, you can now incorporate multiple @volt
blade directives on a single page. This allows for more flexible page structuring and further enriches the developer experience.
Wrapping Up
These two new additions aim to address a few minor pain points, and according to Nuno, "this is likely the final beta release before the stable version."
Eric is the creator of Laravel News and has been covering Laravel since 2012.