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 user's 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
This post is submitted by one of our members. You may submit a new post here.
Laravel interview Questions © 2019 - Designed by PSD to HTML