This commit is contained in:
Adrian Hopek
2022-01-26 10:56:25 +01:00
parent 026bfe485f
commit f3559930c2
28 changed files with 1015 additions and 31 deletions

View File

@@ -23,6 +23,7 @@ use Toby\Enums\EmploymentForm;
* @property EmploymentForm $employment_form
* @property Carbon $employment_date
* @property Collection $vacationLimits
* @property Collection $vacationRequests
*/
class User extends Authenticatable
{
@@ -46,6 +47,11 @@ class User extends Authenticatable
return $this->hasMany(VacationLimit::class);
}
public function vacationRequests(): HasMany
{
return $this->hasMany(VacationRequest::class);
}
public function scopeSearch(Builder $query, ?string $text): Builder
{
if ($text === null) {