Prevent marhun photo blob to be stored into db

This commit is contained in:
afiq.hamzah
2022-11-24 12:21:14 +08:00
parent 1498681fbf
commit f6f0cca41c
-2
View File
@@ -12,13 +12,11 @@ class MarhunPhotoService
public function store(Request $request)
{
$data = base64_encode($request->gambarMarhun->get());
$file_type = $request->gambarMarhun->extension();
$addfile = new FileMarhun();
$addfile->lelongbid_id = $request->lelongbid_id;
$addfile->file_type = $file_type;
$addfile->filename = $data;
if ($request->photo_type == 1) {
$addfile->photo_type = 1;
$addfile->save();