squee
5 years ago
8425
6
Laravel

DELETE Method with href

Posted 5 years ago by squee

Is it possible to have a link do a delete? Currently what I have which is giving me a MethodNotAllowedHttpException.

<a href="{{ route('admin.seen.destroy', $seen->id) }}" data-method="delete">Delete</a>

My route is set up to handle delete

Route::resource('seen', 'SeenController',
        ['only' => ['index', 'create', 'store', 'edit', 'update', 'destroy']]);

Please sign in or create an account to participate in this conversation.