mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-21 11:48:53 +00:00
Updated accounts so actions will trigger cache flush.
This commit is contained in:
@@ -103,19 +103,6 @@ class TransactionController extends BaseController
|
||||
{
|
||||
$type = $transactionJournal->transactionType->type;
|
||||
|
||||
/*
|
||||
* Trigger creation of new piggy bank event
|
||||
*/
|
||||
Event::fire('transactionJournal.destroy', [$transactionJournal]); // new and used.
|
||||
/*
|
||||
* Since this event will also destroy both transactions, trigger on those as
|
||||
* well because we might want to update some caches and what-not.
|
||||
*/
|
||||
/** @var Transaction $transaction */
|
||||
foreach ($transactionJournal->transactions as $transaction) {
|
||||
Event::fire('transaction.destroy', [$transaction]);
|
||||
}
|
||||
|
||||
/** @var \FireflyIII\Database\TransactionJournal $repository */
|
||||
$repository = App::make('FireflyIII\Database\TransactionJournal');
|
||||
$repository->destroy($transactionJournal);
|
||||
|
Reference in New Issue
Block a user