Support the ongoing development of Laravel.io →
posted 7 years ago
Last updated 2 years ago.
0

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

0

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!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

jeck labasan jeck5895 Joined 13 Dec 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.