Laravel Route Options: Default Vs Alternatives Explained
Laravel route options: out-of-the-box routes in web.php, skipping files for custom ServiceProvider, Folio for view-based routing, and Spatie Laravel route attributes for inline route setting. Choose wisely!
Earlier today I reacted on a post about Laravel Folio, and that got me thinking about all the ways you can set routes in Laravel. This is the outcome. Laravel build in options The out-of-the-box way to add routes is by using the files in the routes directory. All the http verbs have a Route class equivalent. And for multiple verbs there are the route and any methods. For all the above methods the route is coupled with a controller method in most cases. The Route class has a special method, view, in case the route doesn't require logic. If it is a static page, I think the best way...