execute(new UserAccountData( name: (string) $this->argument('name'), email: (string) $this->argument('email'), role: Role::Admin, )); } catch (DomainException $exception) { $this->components->error($exception->getMessage()); return self::FAILURE; } if (! $created->setupLinkSent) { $this->components->warn('Admin created, but the set-password email could not be sent (see the log). Fix the mail settings and use "Unohditko salasanan?" on the login page.'); return self::SUCCESS; } $this->components->info('Admin created. A link for setting the password was emailed to '.$this->argument('email').'.'); if (config('mail.default') === 'log') { $this->components->warn('MAIL_MAILER=log: find the link in storage/logs/laravel.log.'); } return self::SUCCESS; } }