journal; // get the event connected to this journal: /** @var PiggyBankEvent $event */ $event = PiggyBankEvent::where('transaction_journal_id', $journal->id)->first(); if (is_null($event)) { return; } $piggyBank = $event->piggyBank()->first(); $repetition = $piggyBank->piggyBankRepetitions()->relevantOnDate($journal->date)->first(); if (is_null($repetition)) { return; } $amount = $journal->amount; $diff = $amount - $event->amount;// update current repetition $repetition->currentamount += $diff; $repetition->save(); $event->amount = $amount; $event->save(); } }