Search code examples
laravelas-keyword

why use of as nickname route using in laravel and when use it


advantage of as keyword using laravel route system

why, when and where its usage is better

how many ways to access route url define by the as keyword and without define as keyword in laravel


Solution

  • Using named routes lets you change the URL for your routes without having to go change the URLs all throughout the application. It's also potentially shorter - you can (as a contrived example) have a named route of login for the path app/user/login.