Support the ongoing development of Laravel.io →
posted 9 years ago
Forms
Last updated 1 year 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 9 years ago.
0

How about in a hidden input field as an array?

0

Sign in to participate in this thread!

Eventy

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.

© 2024 Laravel.io - All rights reserved.