protected function findUnit($mak) { if (($model = \common\models\DaftarUnit::findOne($mak)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }