Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

AhmedNaser's avatar

Route parameter in the query string

Hi there I have a route which sometimes accepts parameters in the query string, but the problem is whenever I add a parameter to the query string I got 404 response code for my api.

Route::prefix('users')->group(function () {
            Route::put('profile', 'UserController@updateProfile')->middleware(['ability:owner,edit-users']);
            Route::get('profile', 'UserController@showProfile');
            Route::get('activities', 'UserActivityController@index');
}
localhost/api/v1/users/activities?page=0
0 likes
1 reply

Please or to participate in this conversation.