简体   繁体   中英

how can i implement this code on laravel blade?

how can i implement this code on laravel blade ?

<td>
echo '<img src="data:image/jpeg;base64,'.base64_encode( $item['image'] ).'"/>';
</td>

or is there another solution to display blob image using laravel ?

            @foreach($data as $item)
                <td>{{$item->idabsensi}}</td>
                <td>{{$item->idkaryawan}}</td>
                <td>{{$item->masuk}}</td>
                <td>{{$item->pulang}}</td>
                <td>
                <img src="data:image/jpeg;base64,'.base64_encode( {{$item->gambarmasuk}} ).'"/>';
                ‌​</td>
                <td>
                </td>
            </tr>
            @endforeach

You dont need single quote

<td>
echo '<img src="data:image/jpeg;base64,{{base64_encode($item['image'])}}"/>';
</td>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM