firefly-iii/app/models/Budget.php
2014-12-16 21:41:16 +01:00

31 lines
598 B
PHP

<?php
use Illuminate\Database\Eloquent\SoftDeletingTrait;
/**
* Class Budget
*/
class Budget extends Component
{
protected $isSubclass = true;
use SoftDeletingTrait;
/**
* @return \Illuminate\Database\Eloquent\Relations\HasManyThrough
*/
public function limitrepetitions()
{
return $this->hasManyThrough('LimitRepetition', 'BudgetLimit', 'component_id');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function budgetlimits()
{
return $this->hasMany('BudgetLimit', 'component_id');
}
}