I'm creating a website using Laravel with a feature that allows you to download a PDF with details from the page you're viewing (i.e. training course).
I use the barryvdh/laravel-dompdf package.
Controller
$data["overview"] = $course[0]['overview__c'];
$pdf = PDF::loadView('pdf.course', $data);
The $data array is passed over into the 'pdf.course' blade file and the values inside contain HTML code/tags.
views > pdf > course.blade.php
<img src="{{asset('images/pdf-logo.fw.png')}}" style="margin-bottom: 25px;">
{{ $overview__c }}
When the PDF is created/downloaded, the data inside doesn't render the HTML code but instead just displays the tags, leaving the PDF completely unformatted.
It appears that any HTML code has to be part of the blade file and can't come from the $data being passed to it.
Does anyone have any solutions or workarounds for me to try?