db->createCommand(Card::SQL_DENY_DOOR_CARD_PASS())->execute(); } public function actionAllowAllCard( ) { \Yii::$app->db->createCommand(Card::SQL_ALLOW_DOOR_CARD_PASS())->execute(); } public function actionDenyExpiredCard( ) { $now = date('Y-m-d H:i:s' ); $now = time(); \Yii::$app->db->createCommand(Card::SQL_DENY_DOOR_CARD_PASS_EXPIRED() ,['datetime'=> $now] ) ->execute(); } }