I have a table with multiple entries with an e button for each one. and i want to show my data of each row in modal using form::model.
First i call index meyhod to show all my data
public function index(){
$user=Auth::user();
$actions=Action::where('state','on_hold')->get();
return view ('actionOnHold',['user' => $user, 'actions' => $actions]);
}
My view i have a table
@foreach($actions as $action)
....
<td><a data-target="#myModal" data-toggle="modal" class="btn btn-info btn-xs accepted"><i class="fa fa-pencil"></i> edit </a></td>
I have this in my modal
@if(isset($action)) {!! Form::model($action, array('route' => ['createAction.update', $action->id], 'method' => 'PUT', 'class'=>'form-horizontal', 'files'=>true)) !!}
My modal only show the last action
Thank you
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire