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; }
public function create(array $data) { return User::create($data); }