What's the best way to populate forms with database data made using the Form class in Laravel while still giving way to Input::old()
if there are any errors? I can't seem to get it right.
My current setup looks something like this
public function getSampleform() {
// Load database data here
return View::make('sampleform');
}
public function postSampleform() {
// Save to database again then redirect to success page
return Redirect::to('success');
}
I usually echo my fields in the View this way:
<?php echo Form::text('entry', Input::old('entry'), array('class' => 'form-select'); ?>
What am I doing wrong?