Search code examples
laravellaravel-4requestputlaravel-5

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?


Solution

  • 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