If I want to make an update request then i have to use?
{{ method_field('PUT') }}
Or
<input type="hidden" name="_method" value="PUT">
https://laravel.com/docs/5.4/routing#form-method-spoofing
HTML forms do not support
PUT
,PATCH
orDELETE
actions. So, when definingPUT
,PATCH
orDELETE
routes that are called from an HTML form, you will need to add a hidden_method
field to the form. The value sent with the_method
field will be used as the HTTP request method:
If you're using only POST
or GET
routes, you won't need it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With