Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120834174
WalletTransactions.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
WalletTransactions.php
View Options
<?php
namespace
App\Console\Commands
;
use
Illuminate\Console\Command
;
class
WalletTransactions
extends
Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected
$signature
=
'wallet:transactions {--detail} {wallet}'
;
/**
* The console command description.
*
* @var string
*/
protected
$description
=
'List the transactions against a wallet.'
;
/**
* Create a new command instance.
*
* @return void
*/
public
function
__construct
()
{
parent
::
__construct
();
}
/**
* Execute the console command.
*
* @return mixed
*/
public
function
handle
()
{
$wallet
=
\App\Wallet
::
where
(
'id'
,
$this
->
argument
(
'wallet'
))->
first
();
if
(!
$wallet
)
{
return
1
;
}
foreach
(
$wallet
->
transactions
()->
orderBy
(
'created_at'
)->
get
()
as
$transaction
)
{
$this
->
info
(
sprintf
(
"%s: %s %s"
,
$transaction
->
id
,
$transaction
->
created_at
,
$transaction
->
toString
()
)
);
if
(
$this
->
option
(
'detail'
))
{
$elements
=
\App\Transaction
::
where
(
'transaction_id'
,
$transaction
->
id
)
->
orderBy
(
'created_at'
)->
get
();
foreach
(
$elements
as
$element
)
{
$this
->
info
(
sprintf
(
" + %s: %s"
,
$element
->
id
,
$element
->
toString
()
)
);
}
}
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 12:59 PM (1 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f0/43/2855f5d709227aafbc8987521bf8
Default Alt Text
WalletTransactions.php (1 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline