Many times we need to show our old values in a form after an error or validation stops our form from submitting. Laravel has a very nice way of retaining old values and populating it back into our form.
I myself used it in a drop down, where I want to show the user the same selected value again when form did not submit properly.
Syntax :-
Simple Form Syntax
<input type="email" class="form-control" name="email" value="{{ old('email') }}">
Laravel Form Syntax
{!! Form::text("email", old('email'), array("placeholder" => "Your Valid Email Address")) !!}
0 Comment(s)