I was wondering if someone can look at this code and tell me why it's not working. When I press the submit button, it will not submit.
{!! Form::open([
'method' => 'DELETE',
'route' => ['posts.destroy', $post->id],
'style' => 'display: inline'
]) !!}
{!! Form::submit('Delete this post?', ['class' => 'btn btn-danger']) !!}
{!! Form::close() !!}
I'm submitting it to a PostController's destory method, where the route is defined as 'posts'.
Route file
Route::group(['prefix' => 'admin'], function() {
Route::resource('posts', 'PostController');
});
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2sJKWue
via IFTTT
Aucun commentaire:
Enregistrer un commentaire