Fix senarai next lelongan at pembida side
This commit is contained in:
@@ -1075,9 +1075,9 @@ class LelongMobileController extends Controller
|
||||
$currentdate = Carbon::now();
|
||||
$currentdate = $currentdate->toDateString();
|
||||
|
||||
$lelong = Lelong::join('cawangan_lelong', 'lelong.id', '=', 'cawangan_lelong.lelong_id')
|
||||
->join('cawangan', 'cawangan_lelong.caw_id', '=', 'cawangan.id')
|
||||
->where('tarikh_lelong', '>', $currentdate)
|
||||
$lelongs = Lelong::join('cawangan_lelong', 'lelong.id', '=', 'cawangan_lelong.lelong_id')
|
||||
->join('cawangan', 'cawangan_lelong.caw_id', '=', 'cawangan.id')
|
||||
->where('tarikh_lelong', '>', $currentdate)
|
||||
->select(
|
||||
'lelong.id as lelong_id',
|
||||
'lelong.tarikh_lelong',
|
||||
@@ -1086,9 +1086,19 @@ class LelongMobileController extends Controller
|
||||
'lelong.masamula_lelong',
|
||||
'lelong.masatamat_lelong',
|
||||
)
|
||||
->groupBy('cawangan.caw_name')
|
||||
->orderBy('lelong.tarikh_lelong', 'ASC')
|
||||
->get()->toArray();
|
||||
->get();
|
||||
|
||||
$lelongs = $lelongs->groupBy('tarikh_lelong');
|
||||
|
||||
$lelong = collect();
|
||||
|
||||
foreach ($lelongs as $index => $lel) {
|
||||
$unique_caw = $lel->unique('caw_id');
|
||||
foreach ($unique_caw as $lel_caw) {
|
||||
$lelong->add($lel_caw);
|
||||
}
|
||||
}
|
||||
|
||||
foreach($lelong as $index => $data)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user