What is reverse routing in Laravel?

  • Sharad Jaiswal
  • 08th Dec, 2022

1 answer(s) :

  •   Reply


    24th Oct, 2018

    Laravel Reverse routing is the process of generating the URL based on name or symbol. It generates URL's based on route declarations. Reverse routing makes your application so much more flexible and helps the developer to write cleaner codes in View. It defines a relationship between links and Laravel routes. When a link is created by using names of existing routes, appropriate Uri's are created automatically by Laravel.

    // route declaration

    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 automatically generate an Url like http://xyz.com/login in view.


Post your Answer :

Valid name is required.

Valid name is required.

Valid email id is required.