vendredi 25 octobre 2019

How to resolve urls correctly in Laravel?

I have url for product details (domain.com/productdetail/1/name-of-product), When i click "about us" page while still in this url, I get an error "this url doesnt exist"(domain.com/productdetail/1/about-us). How can i get the url to resolve correctly to domain.com/about-us

This is my productDetail route

Route::get('/productDetail/{id}/{pro_name}', 
'HomeController@detailPro');

this is about-us route

Route::get('about-us', function(){
return View('about');
});

I would like to get the exactly route (domain.com/about-us) instead of it chaining at the end of the current url (domain.com/productdetail/1/about-us).



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2ogC9SS
via IFTTT

Aucun commentaire:

Enregistrer un commentaire