Page MenuHomePhorge

WalletsCommand.php
No OneTemporary

Authored By
Unknown
Size
797 B
Referenced Files
None
Subscribers
None

WalletsCommand.php

<?php
namespace App\Console\Commands\User;
use App\Console\Command;
class WalletsCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'user:wallets {user}';
/**
* The console command description.
*
* @var string
*/
protected $description = "List a user's wallets.";
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$user = $this->getUser($this->argument('user'));
if (!$user) {
$this->error("User not found.");
return 1;
}
foreach ($user->wallets as $wallet) {
$this->info("{$wallet->id} {$wallet->description}");
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Apr 24, 1:54 PM (5 d, 2 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18849320
Default Alt Text
WalletsCommand.php (797 B)

Event Timeline