'Old data' is a term related to validation errors. You want to show the values from the database?
the second parameter to the old() function is the original value;
value="{{ old('name', $person->name)}}">
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Old data can not display in "edit page".
view
<div class="card card-block">
<h4 class="card-title">edit</h4>
{!! Form::model($person, array('url' => '/person/'.$person->id, 'method' => 'patch', 'class' => 'form-horizontal', 'files'=> true)) !!}
{!! csrf_field() !!}
<fieldset class="row form-group{{ $errors->has('name') ? ' has-error' : '' }}">
<label class="col-xs-2 control-label">name:</label>
<div class="col-xs-10">
<input type="text" class="form-control" name="name"
value="{{ old('name') }}">
@if ($errors->has('name'))
<span class="help-block">
<strong>{{ $errors->first('name') }}</strong>
</span>
@endif
</div>
</fieldset>
<fieldset class="row form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label class="col-xs-2 control-label">email:</label>
<div class="col-xs-10">
<input type="text" class="form-control" name="email" value="{{ old('email') }}">
@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
</fieldset>
<fieldset class="row form-group{{ $errors->has('aplication_way') ? ' has-error' : '' }}">
<label class="col-xs-2 control-label">aplication way:</label>
<div class="col-xs-10">
<div class="c-inputs-stacked">
<label class="c-input c-radio">
<input id="radioStacked1" name="aplication_way" type="radio">
<span class="c-indicator"></span>
telephone
</label>
<label class="c-input c-radio">
<input id="radioStacked2" name="aplication_way" type="radio">
<span class="c-indicator"></span>
email
</label>
</div>
@if ($errors->has('aplication_way'))
<span class="help-block">
<strong>{{ $errors->first('aplication_way') }}</strong>
</span>
@endif
</div>
</fieldset>
<fieldset class="row form-group{{ $errors->has('image') ? ' has-error' : '' }}">
<label class="col-xs-2 control-label" for="inputFile1">image:</label>
<div class="col-xs-10">
<input type="file" class="form-control-file" id="inputFile1" name="photo"
value="{{ old('image') }}">
@if ($errors->has('image'))
<span class="help-block">
<strong>{{ $errors->first('image') }}</strong>
</span>
@endif
</div>
</fieldset>
<fieldset class="form-group">
<div class="col-xs-12">
<button type="submit" class="btn btn-primary">
update
</button>
</div>
</fieldset>
{!! Form::close() !!}
</div>
controller
public function edit($id)
{
$person = Person::findOrFail($id);
return view('person.edit', compact('person'));
}
'Old data' is a term related to validation errors. You want to show the values from the database?
the second parameter to the old() function is the original value;
value="{{ old('name', $person->name)}}">
Please or to participate in this conversation.