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 @@ 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() ) ); } } - } + }); } }