Answer the question
In order to leave comments, you need to log in
How to edit table rows in laravel 4 modal window?
Good afternoon! Can you please tell me how to create a modal window for editing a table row? I understand how to create a modal window with a form, but I can’t figure out how to transfer data from the table to the modal window, because I'm not good at javascript. Please tell me where to dig or where to read?
Answer the question
In order to leave comments, you need to log in
Move the form to a separate view.
For example: app/views/form.blade.php
{{ Form::model($model, ['method'=>'PUT']) }}
{{ Form::text('column_name') }}
....
{{ Form::close() }}
public function getForm()
{
$model = Model::find(Input::get('id'));
return View::make('form', ['model'=>$model]);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question