Click here to Skip to main content
15,397,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have this issue: and im stuck i dont know what to do
That is the all view, and all variables, i tried a lot but i don't know what's wrong if i change put the second parameter $bedrijf this error appears The DELETE method is not supported for this route.

Missing required parameter for [Route: bedrijven.delete] [URI: admin/bedrijven/{bedrijf}/delete] [Missing parameter: bedrijf].

my index link
<a href= {{route('bedrijven.delete', ['bedrijven'=>$bedrijf->id])}}>Verwijder</a>

my controller
public function delete(Bedrijf $bedrijf)
    return view('admin.bedrijven.delete', compact('bedrijf'));

my route

Route::get('admin/bedrijven/{bedrijf}/delete',[BedrijfController::class, 'delete'])
Route::resource('/admin/bedrijven', BedrijfController::class);

What I have tried:

everything asked help on stackoverflow... changed the parameter
Richard Deeming 27-Jun-22 9:56am
I don't do Laravel, but surely if the route is:

then the parameter name needs to be bedrijf, not bedrijven, on the line:
{{route('bedrijven.delete', ['bedrijven'=>$bedrijf->id])}}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900