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

you can do model binding of form with your model for create, update please check this tutorial give you clear picture and really easy

https://laracasts.com/lessons/form-model-binding

Last updated 2 years ago.
0

The video isn't very helpful to me because it assumes I'm using Laravel form tags instead of HTML form tags. I'm using HTML form tags for extra flexibility.

{{ Form:model($order, ['method'] => 'PATCH', 'route' => ['orders.update', $order->id]]) }} 

is not something I can use on my form as it's using HTML, not Laravel form tags.

So I put <input name="_method" type="hidden" value="PATCH"> in my HTML form, and still don't know how to map the form fields to a mysql database, as the video doesn't say how to do it. It just points to code that's in the model when I think I should be using code that's in the controller.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

desbest desbest Joined 25 May 2014

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.