Page MenuHomePhorge

GetBalanceCommand.php
No OneTemporary

Authored By
Unknown
Size
756 B
Referenced Files
None
Subscribers
None

GetBalanceCommand.php

<?php
namespace App\Console\Commands\Wallet;
use App\Console\Command;
class GetBalanceCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'wallet:get-balance {wallet}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Display the balance of a wallet';
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$wallet = $this->getWallet($this->argument('wallet'));
if (!$wallet) {
$this->error("Wallet not found.");
return 1;
}
$this->info((string) $wallet->balance);
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Apr 24, 2:02 PM (1 w, 17 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18740520
Default Alt Text
GetBalanceCommand.php (756 B)

Event Timeline