diff --git a/app/Console/Commands/ShowUsers.php b/app/Console/Commands/ShowUsers.php index 30113ab..49e86fb 100644 --- a/app/Console/Commands/ShowUsers.php +++ b/app/Console/Commands/ShowUsers.php @@ -29,10 +29,12 @@ class ShowUsers extends Command $page = (int) $this->argument('page'); $users = User::all()->forPage($page, 20)->all(); - $this->info("Listing all users for page $page"); - $this->info("Id\tName\tBalance"); + $rows = []; foreach ($users as $user) { - $this->info($user->id . ":\t" . $user->name . "\t" . $user->balance); + array_push($rows, [$user->id, $user->name, $user->balance]); } + + $this->info("Listing all users for page $page"); + $this->table([ 'ID', 'Name', 'Balance' ], $rows); } }