Yii::$app->user->identity->id]); $user_card_access = new UserCardAccesses(); $user_card_access->user_card_id = $user_card->id; $user_card_access->accesses_id = $this->id; $user_card_access->save(); } }