I have the following function in my controller
public function approve($uin)
{
$dir_uin = Approval::where('dir_uin',$uin)->get();
return view('approvals.approve')->withApprovals($dir_uin);
}
and
in my view
@php
@dd($dir_uin)
@endphp
@dd returns a null and i have checked with tinker if the data is being fetched.
any reason why the data is not being passed to the view?