diff --git a/app/Models/Budget.php b/app/Models/Budget.php index 4375c6c2a7..481ad1c6dc 100644 --- a/app/Models/Budget.php +++ b/app/Models/Budget.php @@ -128,4 +128,9 @@ class Budget extends Model get: static fn ($value) => (int)$value, ); } + + public function primaryPeriodStatistics(): MorphMany + { + return $this->morphMany(PeriodStatistic::class, 'primary_statable'); + } } diff --git a/app/Models/Category.php b/app/Models/Category.php index 55c9c7ebcf..5eb63dbcba 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -81,7 +81,7 @@ class Category extends Model } /** - * Get all of the category's notes. + * Get all the category's notes. */ public function notes(): MorphMany {