More code for multi account piggy banks.

This commit is contained in:
James Cole
2024-12-04 06:38:47 +01:00
parent d740814f88
commit 4819b5ac5d
6 changed files with 131 additions and 63 deletions

View File

@@ -116,7 +116,7 @@ class PiggyBank extends Model
public function accounts(): BelongsToMany
{
return $this->belongsToMany(Account::class);
return $this->belongsToMany(Account::class)->withPivot('current_amount');
}
public function piggyBankRepetitions(): HasMany