public function init() { $mobile = EasyHelpers::isMobile(); if ($mobile) { $this->token = false; parent::init(); $detect = new Mobile_Detect(); $token = \Yii::$app->request->get('token', 0); $check = Token::checkMasterToken($token); if ($check && $detect->isMobile()) { return true; } else { echo json_encode(['code' => 1, 'message' => 'deny access']); exit; } } else { return true; parent::init(); } }
public function init() { parent::init(); }
public function init() { parent::init(); include_once \Yii::getAlias('@backend') . '/common/event/DbafterEvent.php'; }