Laravel Routes – What Are Named Routes In Laravel?

Named Routes in Laravel

Named Routes in Laravel s a special feature in which you can change the routes url if it contains ids, some strings according to your usage.

Route::get('user/{id}/profile', function ($id) {

In the above example route containing the parameters but showing the url as profile for the user. It was very helpful in creating SEO friendly url’s.

You may also like...

Leave a Reply

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