-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Closed
Description
Laravel Version
12.10.2
PHP Version
8.2
Database Driver & Version
No response
Description
I'm not sure if this is a bug or if I just don't fully understand how it works.
I'm having an issue related to Laravel route parameters.
I have the following two routes defined:
Route::get('/users/{id}', [UserController::class, 'getUserById']);
Route::get('/users/discover', [UserController::class, 'discover']);
The problem is with the route hierarchy. When I try to access /users/discover, it ends up calling the getUserById method instead, as if discover is being treated as an {id}.
Is this expected behavior?
Steps To Reproduce
Metadata
Metadata
Assignees
Labels
No labels

