This commit is contained in:
Adrian Hopek
2022-01-24 11:21:00 +01:00
parent 03af084c04
commit 36b98e1e67
13 changed files with 54 additions and 39 deletions

View File

@@ -12,7 +12,6 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
* @property int $id
* @property User $user
* @property YearPeriod $yearPeriod
* @property bool $has_vacation
* @property int $days
*/
class VacationLimit extends Model
@@ -21,9 +20,10 @@ class VacationLimit extends Model
protected $guarded = [];
protected $casts = [
"has_vacation" => "boolean",
];
public function hasVacation(): bool
{
return $this->days !== null;
}
public function user(): BelongsTo
{