Using the following route declaration, I am trying to pass a parameter to the controller method however I am unsure of how to do this. I don't want a route parameter but instead a hard coded parameter so that I can use the same function for both updating the current user and other users using a parameter to distinguish between the two operations.
Route::patch('/v1/user', [UserController::class, 'update']);
I need to pass a boolean value to the update method from this Route statement, any ideas?
Route::patch('/v1/user/{id?}', ...);idcan be included or excluded, and you can hook into that in the Controller method and act accordingly.