Laravel how to insert img/signature into pdf produced?

Viewed 19

enter image description here

I was trying to insert the signature saved in database to be displayed in the pdf. However, I was facing this problem that image not found or unknown type.

pdf.blade.php

<img src="{{ $tenancy->landlord_sign}}" alt="">

controller.php

public function TenancyReport($id){
        $tenancy = Tenancy::with(['property'])->find($id);
        $pdf = PDF::loadView('document.tenancy-agreement', compact('tenancy'));

        $path = public_path('uploads/agreement/');
        $fileName =  uniqid() . '.' . 'pdf' ;
        $pdf->save($path . '/' . $fileName);

        $toSave = Tenancy::where('property_id',$id)->update(
            [
                'doc'=>$fileName
            ]
        );

        return $pdf->stream('document.pdf', array('Attachment'=>0));
   }

Database

enter image description here enter image description here

0 Answers
Related