Command for listing users

This commit is contained in:
Axel 2023-07-05 21:16:00 +02:00
parent a6300a6d60
commit f48504394f
Signed by: axel
GPG key ID: 73C0A5961B6BC740

View file

@ -0,0 +1,38 @@
<?php
namespace App\Console\Commands;
use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
class ListUsers extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'fs:user:list';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Listing of existing users';
/**
* Execute the console command.
*/
public function handle()
{
$users = User::get();
$this->table([
'username',
'connected_at',
'created_at',
'updated_at'
], $users);
}
}