How can i get all the rows in a database table that was inserted by a logged in person? I'll provide the codes and snippets below
Controller.php file
public function index(){
$data['user1'] = UserModel::where('seq_id','=',Session::get('loginId'))->first();
return view ("enrollment-steps.step2", $data,
[
'data'=>$data['user1'],
]);
}
Blade.php file
<label><strong> Honors if any(Secondary level): </strong></label>
<div class="col-sm-12 col-lg-4">
<div class="form-group row">
<label for="step2_honor" class="col-sm-3 text-right control-label col-form-label">Honors</label>
<div class="col-sm-9">
<input class="form-control" type="text" id='step2_honor' placeholder="Secondary" value="{!! $user1?->honors !!}" >
</div>
</div>
</div>
What are the other methods I can use to get all the data inserted by the same person? first() method will only get the last inserted row, the get() method throws a Property [honors] does not exist on this collection instance.. For example, in the snippet below app_id 2708 inserted 3 rows, How can i get all the data of in the database that was connected to that person?