This commit is contained in:
Adrian Hopek
2022-04-14 14:29:36 +02:00
parent 27c43872ba
commit e3998238ef
13 changed files with 499 additions and 183 deletions

View File

@@ -74,6 +74,11 @@ class User extends Authenticatable
return $this->hasMany(Vacation::class);
}
public function keys(): HasMany
{
return $this->hasMany(Key::class);
}
public function hasRole(Role $role): bool
{
return $this->role === $role;