コード例 #1
0
ファイル: User.php プロジェクト: spatie-custom/blender
 public function activate() : User
 {
     if ($this->status->doesntEqual(UserStatus::WAITING_FOR_APPROVAL())) {
         throw new UserIsAlreadyActivated();
     }
     $this->status = UserStatus::ACTIVE();
     return $this;
 }