Support the ongoing development of Laravel.io →
posted 7 years ago
Forms
Last updated 7 months ago.
0

From my project:

{{ Form::model($image, ['route' => ['admin.images.update', $image->id], 'method' => 'put', 'role' => 'form']) }}

This will call the update() method, that accepts an id ($image->id) in my case, than I get the image with Image::find($id); and form data with Input::all(); And than proceed to update the database with new values.

0

Thank you, I know how to pass the id, it's submited, I guess automatically(?). I was just wondering if I can pass a class' instance (a Models' instance). It 's just a variable, $cat, so there must be some way.

Last updated 7 years ago.
0

How about in a hidden input field as an array?

0

Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

panosss panosss Joined 18 Jan 2015

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.

© 2022 Laravel.io - All rights reserved.