Menu

## LeaveType extends Model
in package
uses SoftDeletes

LeaveType.php : 29

Class LeaveType

Model for managing leave types and policies.

##### Tags

mixin

### Table of Contents

#### Properties

$academic_year_id : int
$academicYear : AcademicYear
$created_at : DateTime
$deleted_at : DateTime
$id : int
$max_no_of_days : int
$name : string
$school : School
$school_id : int
$status : int
$teacherLeaveApplication : Collection|array<string|int, TeacherLeaveApplication>
$updated_at : DateTime
$fillable : mixed
$table : mixed

#### Methods

academicYear() : BelongsTo
  Get the academic year for this leave type.
school() : BelongsTo
  Get the school for this leave type.
teacherLeaveApplication() : HasMany
  Get teacher leave applications for this leave type.

### Properties

#### $academic_year_id

LeaveType.php : 0
`public int $academic_year_id`

#### $academicYear read-only

LeaveType.php : 0
`public AcademicYear $academicYear`

#### $created_at

LeaveType.php : 0
`public DateTime $created_at`

#### $deleted_at

LeaveType.php : 0
`public DateTime $deleted_at`

#### $id

LeaveType.php : 0
`public int $id`

#### $max_no_of_days

LeaveType.php : 0
`public int $max_no_of_days`

#### $name

LeaveType.php : 0
`public string $name`

#### $school read-only

LeaveType.php : 0
`public School $school`

#### $school_id

LeaveType.php : 0
`public int $school_id`

#### $status

LeaveType.php : 0
`public int $status`

#### $teacherLeaveApplication read-only

LeaveType.php : 0
`public Collection|array<string|int, TeacherLeaveApplication> $teacherLeaveApplication`

#### $updated_at

LeaveType.php : 0
`public DateTime $updated_at`

#### $fillable

LeaveType.php : 35
`protected mixed $fillable = ['school_id', 'academic_year_id', 'name', 'max_no_of_days', 'status']`

#### $table

LeaveType.php : 33
`protected mixed $table = 'leave_types'`

### Methods

#### academicYear()

LeaveType.php : 54

Get the academic year for this leave type.

`public academicYear() : BelongsTo`

##### Return values

BelongsTo

#### school()

LeaveType.php : 44

Get the school for this leave type.

`public school() : BelongsTo`

##### Return values

BelongsTo

#### teacherLeaveApplication()

LeaveType.php : 64

Get teacher leave applications for this leave type.

`public teacherLeaveApplication() : HasMany`

##### Return values

HasMany

## Search results