0 votes
in Laravel by
What is reverse routing in Laravel?

2 Answers

0 votes
by

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’.

http://mysite.com/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.

0 votes
by

Reverse routing is a method of generating URL based on symbol or name. It makes your Laravel application flexible.

...