vendredi 3 août 2018

how to request a certain route from the base route in laravel

Suppose I am on a page having URL localhost/group/123, when i request a route "profile" from that page the URL looks like this localhost/group/profile. But I don't want this, i want the URL to be like this localhost/profile. When i request the "profile" route, it must be look like as localhost/profile.

When i request the profile route from the base route then that URL is what I want to be made as i request for this route from anywhere on my website. This is the route that i make in routes. I have tried prefixes but it don't work for me

Route::get('profile',function(){ echo 'myProfile'; } );

I have searched on other forms that how to resolve it but I can't find a solution.I am very confused that how to resolve it.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire