Support the ongoing development of Laravel.io →
Forms
Last updated 2 years ago.
0

Browsers only support GET and POST requests through form submissions.
The form method will always be one of those and is currently impossible for it to be anything else.
This is a limitation in browsers and not with Laravel of even PHP.

I believe you can fake a PUT or DELETE by adding a hidden form element the the name "_method" and the value of the method you want to fake.

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

The request will still be made over GET or POST but the getMethod should return the one from the hidden field.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.