1
How do I return the value that is in the database of a select field and continue showing the other options to edit:
<div class="form-group">
<label>Tipo de imóvel</label>
<select name="tipo_id" class="form-control">
<option selected="disabled">Selecionar</option>
@foreach($types as $value)
<option>{{$value->nome}}</option>
@endforeach
</select>
</div>
What is the model, or code you are using?
– novic
Which model are you talking about? I’m putting it this way and it returns only the id instead of the name: <select name="type_id" class="form-control"> <option>{$Property->type_id}</option> @foreach($types as $value) <option>{{$value->name}</option> @endforeach </select>
– Marcelo
Marcelo I’m saying before sending to
View
, the code of yourController
?– novic
http://pastebin.com/TrwMtWNy
– Marcelo