When I am creating a new entry and leave at least one field to error out then submit the form, upon validation the field values are blank. Is there a way to return the values to their corresponding field when submitting? Something similar to CodeIgniter's set_value()?
on you controller you can do
return view('form')->withErrors($rules);
and on the template you can use the old api
<input type="text" name="username" value="{{ old('username') }}" />
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community