title: Laravel 5 domPDF PAGE_NUM and PAGE_COUNT
body: <p>I implemented with success domPDF (<a href="https://github.com/barryvdh/laravel-dompdf" rel="nofollow">barryvdh-DOMPDF Wrapper for Laravel</a>) in my Laravel 5 project.</p>
  
  <p>The report is rendering fine, but I was unable to add to my PDF report parameters (like in CodeIgniter): PAGE_NUM, PAGE_COUNT, date and other stuff in the header or footer of the report.</p>
  
  <p>Do you have any solutions to this issue? </p>
  
  <p>My code in Laravel 5:</p>
  
  <pre><code>$data['company'] = Company::find($company_id)-&gt;name;
  $dompdf = PDF::loadView('admin.inputs.report',$data)-&gt;setPaper('A4');
  </code></pre>
  
  <p>In CodeIgniter was simple to insert a header:</p>
  
  <pre><code>$canvas = $this-&gt;dompdf-&gt;get_canvas();
  $font = Font_Metrics::get_font("helvetica", "bold");
  $canvas-&gt;page_text(36, 18, "Page: {PAGE_NUM} from {PAGE_COUNT}", $font, 6, array(0,0,0));
  return $dompdf-&gt;stream('invoice.pdf');
  </code></pre>