mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Expand bill API and v2 account API
This commit is contained in:
@@ -29,6 +29,7 @@ use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
@@ -106,6 +107,16 @@ class UserGroup extends Model
|
||||
return $this->hasMany(GroupMembership::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Link to piggy banks.
|
||||
*
|
||||
* @return HasManyThrough
|
||||
*/
|
||||
public function piggyBanks(): HasManyThrough
|
||||
{
|
||||
return $this->hasManyThrough(PiggyBank::class, Account::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Link to transaction journals.
|
||||
*
|
||||
|
Reference in New Issue
Block a user