Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5: put, patch and delete requests without using Form builder

Since in Laravel 5 the form builder class is absent (you can add it, I know), how can I make put, patch and delete requests to match those routes without using any form builder class, just plain Laravel?

like image 495
Luuk Van Dongen Avatar asked Sep 30 '14 07:09

Luuk Van Dongen


1 Answers

You should try adding:

<input name="_method" type="hidden" value="DELETE">

to your form. This is what Form generator do in Laravel 4 - it simply adds hidden input with name _method.

Of course for DELETE value in above example you can put any other methods

like image 55
Marcin Nabiałek Avatar answered Sep 29 '22 21:09

Marcin Nabiałek