update
parent
06ad739cf5
commit
fa0990e7ca
|
|
@ -73,10 +73,11 @@ class HomeController extends Controller
|
||||||
$data['total'] = \DB::table('dataset as d')
|
$data['total'] = \DB::table('dataset as d')
|
||||||
->where('d.instansi_id', session('instansi_id'))
|
->where('d.instansi_id', session('instansi_id'))
|
||||||
->whereIn('d.template_id', function ($q) {
|
->whereIn('d.template_id', function ($q) {
|
||||||
$q->selectRaw('jsonb_array_elements_text(resource_data::jsonb)')
|
$q->selectRaw('(jsonb_array_elements_text(resource_data::jsonb))::int')
|
||||||
->from('ms_instansi')
|
->from('ms_instansi')
|
||||||
->where('MsInstansiId', session('instansi_id'));
|
->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')
|
// $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
|
// ->whereRaw("ms_instansi.resource_data IS NOT NULL
|
||||||
// AND EXISTS (
|
// AND EXISTS (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue