public function actionMonikeg()
 {
     // get your HTML raw content without any layouts or scripts
     if (!empty($_GET['unit_id'])) {
         $find_query = "SELECT c.* FROM simpel_keg as a\n                            LEFT JOIN pegawai.daf_unit b ON  a.unit_id = b.unit_id\n                            LEFT JOIN simpel_personil c ON  a.id_kegiatan = c.id_kegiatan\n                          WHERE (unit_parent_id='" . $_GET['unit_id'] . "') and tgl_berangkat='" . $_GET['tgl_mulai'] . "' or tgl_kembali='" . $_GET['tgl_kembali'] . "' and c.status=4 group by pegawai_id";
         $query = SimpelPersonil::findBySql($find_query);
         $countQuery = count($query->all());
         $pages = new Pagination(['totalCount' => $countQuery]);
         $models = $query->offset($pages->offset, $pages->pageSize = 10)->limit($pages->limit)->all();
     } else {
         $unit = SimpelPersonil::find()->joinWith('keg')->where('simpel_keg.status = 4')->groupBy('pegawai_id');
         $count = count($unit->all());
         $pages = new Pagination(['totalCount' => $count]);
         $models = $unit->offset($pages->offset, $pages->pageSize = 10)->limit($pages->limit)->all();
     }
     return $this->render('monikeg', ['pages' => $pages, 'models' => $models]);
 }