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