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.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community