In my route :
Route::resource('welcome', 'WelcomeController');
View :
{{ Form::open(['method' => 'DELETE', 'route' =>['WelcomeController.destroy', $task->id]]) }}
{{ Form::submit('Delete', ['class' => 'btn btn-danger']) }}
{{ Form::close() }}
And WelcomeController
Controller :
public function destroy($id)
{
$task = Task::findOrFail($id);
$task->delete();
return back();
}
The error Comes up :
Route [WelcomeController.destroy] not defined. (View: /opt/lampp/htdocs/NewTask/resources/views/welcome.blade.php)