Hi,
in the given example I do not see a reason why the behaviour changes. clients/search must match a regular expression in the preceding routes. clients/search might be matched if you have Route::apiResource('clients', 'clients\ClientsController');
Make sure you define a pattern for the ids, so that strings do not match them. Check if the controller function is invoked at all and figure out which route is invoked.
If no route seems to be invoked make sure you did not move the route to a part of the route configuration where they are additionally filtered. For example you moved it from a part where the user did not need to be logged in to a part where they have to be logged in.
Firtzberg
Thank you for you replay Firtzberg. That's all routes that I have in my application.. and its inside route group where it is guarded by auth:api middleware(I've tested when I'm logged in and returns nothing but when I'm logged out it says not authenticated).. Just kind a strange behaviour.. But my application is working fine now. Again thank you!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community