Dadan Hamdani Dadan Hamdani - 3 years ago 183
MySQL Question

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

Answer Source

You dont need single quote

<td>
echo '<img src="data:image/jpeg;base64,{{base64_encode($item['image'])}}"/>';
</td>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download