title: Laravel DOMPDF not generating HTML pdf file with dynamic data
body: <p>hi guys, im trying to use barryvdh/laravel-dompdf, everything works fine except i cant load my data to the view to dynamically produce content, i keep getting 'Undefined variable: data'</p>
  
  <p>here is my code:</p>
  
  <pre><code>  $data =[
      'fname'=&gt;Input::get('efname'),
      'lname'=&gt;Input::get('elname'),
      'dob'=&gt;Input::get('edob'),
      'reg_date'=&gt;date('Y-m-d'),
      'email'=&gt;Input::get('eemailaddrs'),
      'gender'=&gt;Input::get('gender'),
      'mobile'=&gt;Input::get('emobile'),
      'p_addrss'=&gt;Input::get('epaddress'),
      'c_addrss'=&gt;Input::get('ecaddress'),
      'quals'=&gt;Input::get('quali'),
      'pdfname'=&gt;$pdfname,
      'empId'=&gt;Input::get('employeeId'),
      ];
  return PDF::loadView('employee/generatepdf',$data)
          -&gt;save(public_path().'/pdfs/'.$pdfname.'.pdf');
  </code></pre>
  
  <p>its going to pdf template page..But cant get the array values.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
   &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"/&gt;
  &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;img align="center" src="{{public_path()}}/assets/img/logo.png"&gt;
  &lt;table align="center" style="width:100%;margin-top:25px;"&gt;
  &lt;tr&gt;
      &lt;td style="width:50%"&gt;Registration ID&lt;/td&gt;
      &lt;td style="width:50%"&gt;:{{$data['empId']}}&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
      &lt;td style="width:50%"&gt;Name&lt;/td&gt;
      &lt;td style="width:50%"&gt;:{{$data['fname']}} {{$data['lname']}}&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>also not taking css rules into pdf file. </p>
  
  <p>How can i solve this issue...?</p>
  
  <p>Thanks</p>