Part 3: Fluent Routing – Laravel 5.4 New Features
In Laravel 5.4 we can now make and modify our routes using an all new, easier to use syntax! We call this Fluent Routing. Instead of using tons of embedded arrays in our routes file, we can now use a more object oriented approach.
Just combine whichever functions you need, to get the job done.
You can use:
– prefix()
– middleware()
– name()
– get()
– post()
– put()
– delete()
– options()
– patch()
– group()
Use them however you want and in any order. This allows you to better organize your routes file appropriately.
source