What is reverse routing in laravel

Reverse Routing in Laravel

In Laravel reverse routing is generating URL’s based on route declarations.Reverse routing makes your application so much more flexible.

For example the below route declaration tells Laravel to execute the action “login” in the  users controller when the request’s URI is ‘login’.


Route::get(‘login’, ‘users@login’);

Using reverse routing we can create a link to it and pass in any parameters that we have defined. Optional parameters, if not supplied, are removed from the generated link.

{{ HTML::link_to_action('users@login') }}

It will create a link like http://mysite.com/login in view

Leave a Reply

Your email address will not be published. Required fields are marked *