No one? Or i am totally on the wrong way?
Let's say your $location is an array and your controller code looks like this:
public function getEdit($id){
$location = Location::find($id);
return View::make('locations.edit')->with('location',array(
'name' => $location->name
));
}
Then, your form should look like this:
<div class="form-group control-group">
{{ Form::label('Location[slug]', 'Slug',array('class' => 'control-label')) }}
<div class="controls">
{{ Form::text('Location[slug]', $name, array('class' => 'form-control')) }}
</div>
</div>
The text method accepts 3 parameters:
You have set your value to null
Hope this helps
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community