Skip to content
Advertisement

Laravel 6 – Missing required parameters for [Route: suppliers.destroy] [URI: suppliers/{supplier}]

i have index page with a button to remove a column from a table.

JavaScript

but now everytime i open my index page it gives me this error message

FacadeIgnitionExceptionsViewException Missing required parameters for [Route: suppliers.destroy] [URI: suppliers/{supplier}]. (View: C:xampphtdocsInventresourcesviewssuppliersindex.blade.php)

this is my route

Route::resource('suppliers', 'SuppliersController');

and this is destroy function from SuppliersController

JavaScript

I already try this solution and it gives me another error message.

Advertisement

Answer

well you are not passing the required parameter for the controller’s action. destroy method receives a parameter idSupplier to perform its actions. from blade you are just calling the controller action without passing the parameter. make it like below:

JavaScript

but it won’t work. your registered route method is DELETE but it will redirect to a GET method. So use the follwing method for deleting.

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement