As per this link, we have been told that with reverse routing, we can generate links. But Laravel already provides named routing
for the same. As well as there is another way to generate link is the route
helper function.
Then what is actual benefit of using reverse routing in Laravel?
Laravel reverse routing benefit should be apparent. Say you want to change your login URL to users/signin, if you aren't using named routes you'd have to go through and manually change all URLs to point to the new URL. That's a lot of wasted time. With named routes you simply change the route in routes.php and all of your links will now point to the new UR.
You can check this link for detail description about reverse routing. http://jasonlewis.me/article/laravel-reverse-routing
Why nobody is referring this --> {{route('user.login')}}
while you declared this name to route. Can we say this is a reverse routing?
Just you have to declare the following:
Route::get('login', 'users@login')->name('user.login');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With