vendredi 29 janvier 2016

Laravel 5 missing required parameters on destroy route

I recently upgraded from laravel 5.1 to 5.2 and now I'm getting an error of Missing required parameters for [Route: example.destroy] [URI: example/{args}].

The error occurs here: <form class="form-horizontal" action="<?php echo route('example.destroy'); ?>" method="post"> on the action attribute of the form.

Route

Route::resource('example', 'ExampleController');

When I was in 5.1, there was no error with this line. Just went I upgrade to 5.2, it now occurs.

The functionality of this is that it will allow user to delete multiple entries by checking the checkboxes that they wish to be deleted. Then upon submit, it will redirect to the destroy method on the controller.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire