Ok, so I use the following snippet to get \"views\" of HTML with PHP variables loaded in as $data
so that I can do things like fill in tr
\'s of dat
Improved version of Dennis Ameling's answer to take into account…
Do not forget to enable PHP support like this $dompdf->set_option("isPhpEnabled", true);
(or, if you're using laravel-dompdf PDF::setOptions(['isPhpEnabled' => true]);
).
If you only need $pageNum, using a CSS counter is a way simpler approach!