you can do model binding of form with your model for create, update please check this tutorial give you clear picture and really easy
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.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community