mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-07 02:18:11 +00:00
Link currency to user and user group.
This commit is contained in:
@@ -30,6 +30,7 @@ use FireflyIII\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||
use Illuminate\Support\Carbon;
|
||||
@@ -129,6 +130,16 @@ class UserGroup extends Model
|
||||
return $this->hasMany(Account::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Link to currencies
|
||||
*
|
||||
* @return BelongsToMany
|
||||
*/
|
||||
public function currencies(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(TransactionCurrency::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Link to attachments.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user