display picture in pdf generated with laravel

Solutions on MaxInterview for display picture in pdf generated with laravel by the best coders in the world

showing results for - "display picture in pdf generated with laravel"
Emir
13 Jan 2020
1   //in Controller    
2        $path = 'images/V.png';
3        $type = pathinfo($path, PATHINFO_EXTENSION);
4        $data = file_get_contents($path);
5        $logo = 'data:image/' . $type . ';base64,' . base64_encode($data);
6  //in View
7         <img src="{{ $data['logo'] }}" width="150" height="150" />
8               
9