middleware('auth'); } public function index() { return view('layouts.dev.beranda.app'); } public function info(){ $grafikUser = \App\User::where('user_type','user')->count(); $grafikUserUpt = \App\User::where('user_type','upt')->count(); $grafikUserWaba = \App\User::where('user_type','waba')->count(); $siteConf = \App\Model\Privillage\Role::all(); return view('layouts.dev.info.app',compact('grafikUser','grafikUserWaba','grafikUserUpt','siteConf')); } public function getRoleName($id){ $result = Role::where('id',$id)->value('role_name'); return Response($result); } public function getTypeCodeUpt($id){ $result = Upt::where('office_id',$id)->value('office_name'); return Response($result); } public function getTypeCodeWaba($id){ $result = ISRMaster::where('clnt_id',$id)->value('clnt_name'); return Response($result); } public function getUpt() { $upts = Upt::select('office_id','office_name')->distinct()->get(); if (!$upts) { $html = ''; } else { $html = ''; foreach ($upts as $upt) { if ($upt != '') { $html .= ''; } else{ $html = ''; } } } return response()->json(['html' => $html]); } public function getWaba() { $wabas = ISRMaster::select('clnt_id','clnt_name')->distinct()->get(); if (!$wabas) { $html = ''; } else { $html = ''; foreach ($wabas as $waba) { if ($waba != '') { $html .= ''; } else{ $html = ''; } } } return response()->json(['html' => $html]); } }