update simulasi (hapus simulasi)
This commit is contained in:
@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Auth;
|
||||
|
||||
use App\Models\Lelong;
|
||||
use App\Models\CawanganLelong;
|
||||
use App\Models\Pengesahan;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class HomeController extends Controller
|
||||
@@ -54,7 +55,30 @@ class HomeController extends Controller
|
||||
|
||||
|
||||
}//dd($detailsinfo);
|
||||
return view('home',compact('lelong', 'arrayinfo'));
|
||||
$arrayinfomutu = [];
|
||||
//HOME KELULUSAN MUTU MARHUN
|
||||
$lelongmutu = pengesahan::join('lelong','lelong.id','=','pengesahan.lelong_id')
|
||||
// ->where('sts_lelong', 0)
|
||||
->whereIn('pengesahan.status_ubah', [1,2,3,4,5])
|
||||
->where('disahkan_oleh','=', NULL)
|
||||
->select('pengesahan.lelong_id','lelong.id','lelong.tarikh_lelong','lelong.masatamat_lelong','lelong.harga_emas_asas','lelong.jbg','lelong.cajlelong','sts_lelong')
|
||||
// ->groupBy('pengesahan.lelong_id')
|
||||
|
||||
->distinct()
|
||||
->get()
|
||||
->toArray();
|
||||
// dd($lelong);
|
||||
|
||||
foreach($lelongmutu as $infomutu)
|
||||
{
|
||||
$detailsinfo = CawanganLelong::join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
|
||||
->where('lelong_id',$infomutu['lelong_id'])
|
||||
->get()
|
||||
->toArray();
|
||||
array_push($arrayinfomutu,['info'=>$infomutu, 'detailsinfo'=>$detailsinfo]);
|
||||
}
|
||||
|
||||
return view('home',compact('lelongmutu', 'arrayinfomutu'));
|
||||
}
|
||||
|
||||
public function about()
|
||||
@@ -63,4 +87,31 @@ class HomeController extends Controller
|
||||
// $user->assignRole('admin');
|
||||
return view('about');
|
||||
}
|
||||
|
||||
public function senarailelongubahmutu()
|
||||
{
|
||||
$arrayinfo = [];
|
||||
|
||||
$lelong = pengesahan::join('lelong','lelong.id','=','pengesahan.lelong_id')
|
||||
// ->where('sts_lelong', 0)
|
||||
->whereIn('pengesahan.status_ubah', [1,2,3,4,5])
|
||||
->select('pengesahan.lelong_id','lelong.id','lelong.tarikh_lelong','lelong.masatamat_lelong','lelong.harga_emas_asas','lelong.jbg','lelong.cajlelong','sts_lelong')
|
||||
// ->groupBy('pengesahan.lelong_id')
|
||||
|
||||
->distinct()
|
||||
->get()
|
||||
->toArray();
|
||||
dd($lelong);
|
||||
|
||||
foreach($lelong as $info)
|
||||
{
|
||||
$detailsinfo = CawanganLelong::join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
|
||||
->where('lelong_id',$info['lelong_id'])
|
||||
->get()
|
||||
->toArray();
|
||||
array_push($arrayinfo,['info'=>$info, 'detailsinfo'=>$detailsinfo]);
|
||||
}
|
||||
|
||||
return view('home',compact('lelong', 'arrayinfo'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user