update
parent
e059da856f
commit
cd57095213
|
|
@ -70,15 +70,15 @@ class HomeController extends Controller
|
|||
) as total_resource
|
||||
")
|
||||
->value('total_resource');
|
||||
$data['total'] = \DB::table('dataset as d')
|
||||
->where('d.instansi_id', session('instansi_id'))
|
||||
->where('d.status',1)
|
||||
->whereIn('d.template_id', function ($q) {
|
||||
$data['total'] = Dataset::where('instansi_id', session('instansi_id'))
|
||||
->where('status',1)
|
||||
->where('tahun',date('Y'))
|
||||
->whereIn('template_id', function ($q) {
|
||||
$q->selectRaw('(jsonb_array_elements_text(resource_data::jsonb))::int')
|
||||
->from('ms_instansi')
|
||||
->where('MsInstansiId', session('instansi_id'));
|
||||
})
|
||||
->count();
|
||||
})->count();
|
||||
|
||||
// $data['total'] = Instansi::where('MsInstansiId',session('instansi_id'))->join('dataset as d', 'd.instansi_id', '=', 'ms_instansi.MsInstansiId')
|
||||
// ->whereRaw("ms_instansi.resource_data IS NOT NULL
|
||||
// AND EXISTS (
|
||||
|
|
|
|||
Loading…
Reference in New Issue