Loading…

How to create route name in Laravel 5?

You can create this by "name" attribute in your routes/web.php.

Below is an example

Route::get('contact-us', 'FrontendController@contact')->name('contact');
In this example our route name is contact. You can call this route URL with this route name also.

<a href="{{route('contact')}}"> Go to Contact page </a>

Suggest An Answer

No suggestions avaliable!

Latest post from Laravel 5 Interview Questions

Ask Question