Update LelongMobileController.php
This commit is contained in:
@@ -28,25 +28,33 @@ class LelongMobileController extends Controller
|
||||
->where('sts_lelong','=',1)
|
||||
->get()->toArray();
|
||||
|
||||
foreach($lelong as $index1=>$lel)
|
||||
if($lelong)
|
||||
{
|
||||
$lelongbid = LelongBid::whereIn('lelong_id',$lelong)
|
||||
->get()->toArray();
|
||||
|
||||
$lelong[$index1]['lelongbid'] = $lelongbid;
|
||||
|
||||
foreach($lelongbid as $index2=>$lelbidmarhun){
|
||||
$cawangan = Cawangan::where('id','=',$lelbidmarhun['caw_id'])->first()->toArray();
|
||||
// $id = lelongbid::first();
|
||||
|
||||
$lelongbidmarhun = LelongBidMarhun::where('lelongbid_id', $lelbidmarhun['id'])
|
||||
foreach($lelong as $index1=>$lel)
|
||||
{
|
||||
$lelongbid = LelongBid::whereIn('lelong_id',$lelong)
|
||||
->get()->toArray();
|
||||
|
||||
$lelong[$index1]['lelongbid'][$index2]['lelongbidmarhun'] = $lelongbidmarhun;
|
||||
$lelong[$index1]['lelongbid'][$index2]['cawangan'] = $cawangan;
|
||||
$lelong[$index1]['lelongbid'] = $lelongbid;
|
||||
|
||||
foreach($lelongbid as $index2=>$lelbidmarhun){
|
||||
$cawangan = Cawangan::where('id','=',$lelbidmarhun['caw_id'])->first()->toArray();
|
||||
// $id = lelongbid::first();
|
||||
|
||||
$lelongbidmarhun = LelongBidMarhun::where('lelongbid_id', $lelbidmarhun['id'])
|
||||
->get()->toArray();
|
||||
|
||||
$lelong[$index1]['lelongbid'][$index2]['lelongbidmarhun'] = $lelongbidmarhun;
|
||||
$lelong[$index1]['lelongbid'][$index2]['cawangan'] = $cawangan;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$lelong[0]['lelongbid'] = [];
|
||||
}
|
||||
|
||||
return response()->json($lelong);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user