public function handle(VerifyEmailAddress $command)
 {
     $user = User::whereConfirmationCode($command->code)->first();
     if (is_null($user)) {
         throw new InvalidConfirmationCodeException("Invalid Confirmation Code.");
     }
     $user->confirm();
     return $user;
 }
Example #2
0
 public function create(array $data)
 {
     return User::create($data);
 }