laravel / jetstream

Tailwind scaffolding for the Laravel framework.
https://jetstream.laravel.com
MIT License
3.93k stars 809 forks source link

[5.x] Remove `_method` in `UpdateProfileInformationForm.vue` #1493

Closed osbre closed 2 months ago

osbre commented 2 months ago

Makes it a bit simpler. I assume the _method property was used when there were no other ways to submit the form.

Also, this is the only place with _method in Jetstream and Breeze.

taylorotwell commented 2 months ago

Hmm, not sure we should change this without full understanding of why it was historically done.

osbre commented 2 months ago

You're 100% right 😅 I just checked the docs:

Uploading files via put or patch is not supported in Laravel. Instead, make the request via post, including a _method field set to put or patch. This is called form method spoofing.

https://inertiajs.com/manual-visits#method