I'm using the PHP language and the Laravel Framework 5. In the form validation, if it contains some blank field or with not accepted character sizes, when clicking save the system shows the validation message, however the textarea fields and the select option that were filled in are blank. How do I keep these types of data in the form after clicking save when some field is incorrect?
Textarea code:
<textarea class="form-control" name="descricao" id="descricao"></textarea>
My select has only one option because it takes the values directly from the database. Select option code:
<select class="form-control" name="categoria" id="categoria">
<option value="null"> Selecione uma categoria </option>
@foreach($categorias as $row)
<option value="{{ $row->id }}"
{{ $row->nome }}
</option>
@endforeach
</select>