Page MenuHomePhorge

UserWallets.php
No OneTemporary

Authored By
Unknown
Size
931 B
Referenced Files
None
Subscribers
None

UserWallets.php

<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class UserWallets 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 wallets for a user';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$user = \App\User::where('email', $this->argument('user'))->first();
if (!$user) {
return 1;
}
foreach ($user->wallets as $wallet) {
$this->info("{$wallet->id} {$wallet->description}");
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Apr 24, 10:18 AM (5 h, 29 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18748737
Default Alt Text
UserWallets.php (931 B)

Event Timeline