title: Passing variable from DOMPDF controller to view
body: <p>I want create a DOMPDF with laravel, and I must passing my variable to view. I've been try passing variable like below, but it still not working yet.</p>
  
  <p>here my Laravel Controller</p>
  
  <pre><code> public function pdf(Request $request, $id){
      $salesorder = $this-&gt;show($id)-&gt;salesorder;
      $detailservice = $this-&gt;show($id)-&gt;detailservice;
      $detailemployee = $this-&gt;show($id)-&gt;detailemployee;
  
      $data = [$salesorder, $detailemployee, $detailservice];
  
      $pdf = PDF::loadView('summary.invoice', $data);
      return $pdf-&gt;download('invoice.pdf');
  }
  </code></pre>
  
  <p>the error on my view is :</p>
  
  <blockquote>
    <p>Undefined variable: salesorder</p>
  </blockquote>
  
  <p>How to passing some variable from Laravel controller to DOMPDF ?</p>
  
  <p>PS : <code>dd($data)</code> result is correctly</p>