Page MenuHomePhorge

No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
diff --git a/src/app/Console/Commands/WalletTransactions.php b/src/app/Console/Commands/WalletTransactions.php
index 8b19f98a..ed36d08b 100644
--- a/src/app/Console/Commands/WalletTransactions.php
+++ b/src/app/Console/Commands/WalletTransactions.php
@@ -1,62 +1,62 @@
<?php
namespace App\Console\Commands;
use App\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.';
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$wallet = $this->getWallet($this->argument('wallet'));
if (!$wallet) {
return 1;
}
- foreach ($wallet->transactions()->orderBy('created_at')->get() as $transaction) {
+ $wallet->transactions()->orderBy('created_at')->each(function ($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

Mime Type
text/x-diff
Expires
Fri, Apr 24, 10:29 AM (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18773100
Default Alt Text
(1 KB)

Event Timeline