Level 122
try with APP_ENV set to production
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a route:
Route::delete('/recipes/{recipe}', [RecipeController::class, 'destroy'])->name('recipes.destroy');
but If I am trying to manually write in the uri input /recipes/1 I am getting an error:
The GET method is not supported for route recipes/1. Supported methods: DELETE.
How can I solve this situation? I don't want user see that error if he try to write /recipes/1
Your solution is fine for single case. But, to cover all scenarios you can do:
Route::fallback(function () {
abort(404);
});
Please or to participate in this conversation.