Closed lejober95 closed 5 years ago
Please I need help
hi, this is caused by the order of your routes; Laravel goes through the routes from top to bottom.
Placing the Route::get('/test?', 'EtudController@test');
on top which has an optional parameter test?
, makes your other routes (/vers
and /register
) unreachable.
Any entries after the /
is assumed as the parameter for your Route::get('/test?', 'EtudController@test');
route
You could try rearranging your routes.
Hi thank you but explain me a little bit this way to do
makes your other routes (/vers and /register) unreachable. how? by deleting the "/" ?
hi, this is caused by the order of your routes; Laravel goes through the routes from top to bottom.
Placing the
Route::get('/test?', 'EtudController@test');
on top which has an optional parametertest?
, makes your other routes (/vers
and/register
) unreachable.Any entries after the
/
is assumed as the parameter for yourRoute::get('/test?', 'EtudController@test');
routeYou could try rearranging your routes.
Hi thank you but explain me a little bit this way to do
makes your other routes (/vers and /register) unreachable. how? by deleting the "/" ?
It takes the words "vers" and "register" as an input for your test parameter. You could try printing the request from the test method on your controller to see if it will print those words.
makes your other routes (/vers and /register) unreachable. how? by deleting the "/" ?
your first route expects an input after the slash. Meaning, if you went to /foo
, the word foo
is taken as the parameter for your first route. Same thing will happen if you went to /vers
and /register
since it's the first thing it will see on the routes with the same format.
I try to set up route localhost:8000/vers or localhost:8000/register in laravel using following routes: but when i go to localhost:8000/vers or localhost:8000/register it runs the localhost:8000/test or the localhost /voir_doc/{voirmat} . please help , i get troubled
==> je ne cesse de me troubler, S'il vous plait aidez moi, quand j'essaie de lancer <<localhost:8000/vers ou localhost:8000/register>> ce sont les routes << localhost:8000/test ou localhost:8000>> qui répondent en lieu et place en tout cas les routes <> ne répondent pas