diff --git a/app/Http/Controllers/MarhunController.php b/app/Http/Controllers/MarhunController.php index c608734a..17946569 100644 --- a/app/Http/Controllers/MarhunController.php +++ b/app/Http/Controllers/MarhunController.php @@ -515,6 +515,7 @@ class MarhunController extends Controller public function show($id, $lelong_id) { + $lelongbid = LelongBid::where('id', '=', $id)->first(); $filemarhun = FileMarhun::where('lelongbid_id', '=', $lelongbid['id']) ->where('photo_type', '=', '1') @@ -540,16 +541,13 @@ class MarhunController extends Controller $index->eachmarhun_id = $eachmarhun->id; } - /** - * FIXME: - * Status here need to clarify - */ $status = Pengesahan::where('lelongbid_id', $id) ->where('lelong_id', $lelongbid['lelong_id']) ->first(); // dd($status); - // $marhun[$index->status_semak] = $status; - // dd($status); + + + $index->status = $status; } diff --git a/app/Services/MarhunPhotoService.php b/app/Services/MarhunPhotoService.php index 22bafd7b..443591d0 100644 --- a/app/Services/MarhunPhotoService.php +++ b/app/Services/MarhunPhotoService.php @@ -5,6 +5,7 @@ namespace App\Services; use Illuminate\Http\Request; use Illuminate\Support\Facades\Storage; use App\Models\FileMarhun; +use App\Models\LelongBid; class MarhunPhotoService { @@ -12,6 +13,7 @@ class MarhunPhotoService public function store(Request $request) { + $file_type = $request->gambarMarhun->extension(); $addfile = new FileMarhun(); @@ -52,7 +54,7 @@ class MarhunPhotoService $marhunImageFileName = "overall.{$imageExtension}"; - if (!empty($request->lelongbidmarhund_id)) { + if (!empty($request->lelongbidmarhun_id)) { $marhunImageFileName = "$lelongbidmarhun_id.$imageExtension"; } diff --git a/resources/views/marhun/marhun.blade.php b/resources/views/marhun/marhun.blade.php index 802fab64..4b00aa60 100644 --- a/resources/views/marhun/marhun.blade.php +++ b/resources/views/marhun/marhun.blade.php @@ -429,8 +429,8 @@ $imageLink = route('marhun.showphotomarhun', ['lelong_id' => $lelongbid['lelong_id'], 'filemarhun_id' => $lelongbid['filemarhun_id']]); @endphp Lihat gambar - +