mirror of
https://github.com/axeloz/filesharing.git
synced 2025-05-06 10:03:55 +02:00
Command for listing users
This commit is contained in:
parent
a6300a6d60
commit
f48504394f
1 changed files with 38 additions and 0 deletions
38
app/Console/Commands/ListUsers.php
Normal file
38
app/Console/Commands/ListUsers.php
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue