/** * Execute the console command. * * @return mixed */ public function handle() { $user = User::whereEmail('*****@*****.**')->first(); if (!$user) { $user = new User(['name' => 'Quoterr Bot', 'email' => '*****@*****.**', 'is_admin' => true, 'is_moderator' => true]); if (!$user->save()) { $this->error('Failed to create user bot.'); array_map(function ($x) { (new Dumper())->dump($x); }, $user->getErrors()->toArray()); } else { $this->info('User bot created.'); } } else { $this->warn('User bot already exists.'); } }