/** * Execute the console command. * * @return void */ public function handle() { $this->info('Checking all user accounts.'); $count = 0; $factory = app(ClientFactory::class); foreach (User::all() as $user) { try { $factory->make($user)->me()->show(); } catch (Exception $e) { $count++; $this->error("Bad user: {$user->id}, {$user->name}, {$user->username}, {$user->email}"); } } $this->info("Found {$count} bad users."); }