Using laravel debug bar I can see that session_attributes => _old_input contains the correct information, it seems the old() helper isn’t working though.
Oct 23, 2015
7
Level 9
On a validation error, my form has no old input data?
My controller has the following validation code:
$validator = Validator::make(
$request->all(),
['photo' => 'photosize'],
['photosize' => 'At least one uploaded file exceeds size limit of 5MB']
);
if ($validator->fails()) {
return redirect('/admin/note/new')
->withErrors($validator)
->withInput();
}
And in my blade template for the form two of the inputs contain name="foo" value="{{ old('foo') }}". The form however is blank. What am I missing?
Level 5
try this
<input type="text" value=" { { old('foo') } } " name="foo">
remove the space between the curly braces
3 likes
Please or to participate in this conversation.