Upload Image dalam Base64 di Laravel
$gambar_unggulan = $request->file('gambar_unggulan')->storeAs('gambar', "gambar.png");
$path = '../storage/app/gambar/gambar.png';
$type = pathinfo($path, PATHINFO_EXTENSION);
$data = file_get_contents($path);
$base64 = 'data:image/' . $type . ';base64,' . base64_encode($data);
//dd($base64);
//$gambar = base64_decode($ubah);
echo '<img src="' . $base64 . '" />';
Lanjut Part : 1
Jam : 14:41:18
Durasi Part : 0:0:1
Durasi Total : 0:0:1
Punya Pertanyaan , Silahkan Whatsapp Langsung
Muhammad Ullil Fahri
WA : 089696380422
Tautan WA : https://wa.me/message/SG4YA2XQP5FPE1
Muhammad Ullil Fahri
WA : 089696380422
Tautan WA : https://wa.me/message/SG4YA2XQP5FPE1