Support the ongoing development of →
posted 9 years ago
Last updated 2 years ago.

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.


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.

How about in a hidden input field as an array?


Sign in to participate in this thread!


Your banner here too?

panosss panosss Joined 18 Jan 2015


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.