jeudi 1 novembre 2018

How to improve laravel routing?

I am working on some ecommerce project in laravel framework where my category route is below:-

Route::get('/category/{catname}', 'SearchController@searchCatProducts');

When i access website its working like this:-

www.example.com/category/men

But our client wants it should like this :-

www.example.com/men

if i create Roue like:-

Route::get('/{catname}', 'SearchController@searchCatProducts');
and other routes will also reflect like aboutus, contactus,
 Route::get('/aboutus', 'CMScontroller@aboutus');

Can anyone help me. Thanks in advance.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire