Resource Controller destroy not working instead it is redirecting to show() method #51086
Unanswered
Muhammad-fareed
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using resource controller to shorten my code in laravel 10 everything works fine but in laravel 11 it is not working fine heres my web.php code :
Route::resource("test",TestController::class);
in my index.blade.php in resource :
<a href="{{route('test.destroy',$test->id)}}" class="btn btn-danger">Delete</a>
when i hit this route it takes me to show() method instead of destroy()
Beta Was this translation helpful? Give feedback.
All reactions