Menu

## Subject extends Model
in package
uses SoftDeletes

Subject.php : 35

Class Subject

Model for managing school subjects.

##### Tags

mixin

### Table of Contents

#### Properties

$academic_year_id : int
$academicYear : AcademicYear
$code : string
$created_at : DateTime
$deleted_at : DateTime
$id : int
$mark : Collection|array<string|int, Mark>
$name : string
$schedule : Collection|array<string|int, ExamSchedule>
$school : School
$school_id : int
$section : Section
$section_id : int
$standard : Standard
$standard_id : int
$teacherlink : Collection|array<string|int, Teacherlink>
$type : string
$updated_at : DateTime
$fillable : array<string|int, mixed>
  The attributes that are mass assignable.
$table : string
  The table associated with the model.

#### Methods

academicYear() : BelongsTo
  Get the academic year for this subject.
getNameAttribute() : string
  Get the uppercase name for this subject.
mark() : HasMany
  Get marks for this subject.
schedule() : HasMany
  Get exam schedules for this subject.
school() : BelongsTo
  Get the school for this subject.
section() : BelongsTo
  Get the section for this subject.
standard() : BelongsTo
  Get the standard for this subject.
teacherlink() : HasMany
  Get teacher links for this subject.

### Properties

#### $academic_year_id

Subject.php : 0
`public int $academic_year_id`

#### $academicYear read-only

Subject.php : 0
`public AcademicYear $academicYear`

#### $code

Subject.php : 0
`public string $code`

#### $created_at

Subject.php : 0
`public DateTime $created_at`

#### $deleted_at

Subject.php : 0
`public DateTime $deleted_at`

#### $id

Subject.php : 0
`public int $id`

#### $mark read-only

Subject.php : 0
`public Collection|array<string|int, Mark> $mark`

#### $name

Subject.php : 0
`public string $name`

#### $schedule read-only

Subject.php : 0
`public Collection|array<string|int, ExamSchedule> $schedule`

#### $school read-only

Subject.php : 0
`public School $school`

#### $school_id

Subject.php : 0
`public int $school_id`

#### $section read-only

Subject.php : 0
`public Section $section`

#### $section_id

Subject.php : 0
`public int $section_id`

#### $standard read-only

Subject.php : 0
`public Standard $standard`

#### $standard_id

Subject.php : 0
`public int $standard_id`

#### $teacherlink read-only

Subject.php : 0
`public Collection|array<string|int, Teacherlink> $teacherlink`

#### $type

Subject.php : 0
`public string $type`

#### $updated_at

Subject.php : 0
`public DateTime $updated_at`

#### $fillable

Subject.php : 52

The attributes that are mass assignable.

`protected array<string|int, mixed> $fillable = ['school_id', 'academic_year_id', 'standard_id', 'section_id', 'name', 'code', 'type']`

#### $table

Subject.php : 45

The table associated with the model.

`protected string $table = 'subjects'`

### Methods

#### academicYear()

Subject.php : 82

Get the academic year for this subject.

`public academicYear() : BelongsTo`

##### Return values

BelongsTo

#### getNameAttribute()

Subject.php : 62

Get the uppercase name for this subject.

`public getNameAttribute(mixed $value) : string`

##### Parameters

$value : mixed

##### Return values

string

#### mark()

Subject.php : 122

Get marks for this subject.

`public mark() : HasMany`

##### Return values

HasMany

#### schedule()

Subject.php : 132

Get exam schedules for this subject.

`public schedule() : HasMany`

##### Return values

HasMany

#### school()

Subject.php : 72

Get the school for this subject.

`public school() : BelongsTo`

##### Return values

BelongsTo

#### section()

Subject.php : 102

Get the section for this subject.

`public section() : BelongsTo`

##### Return values

BelongsTo

#### standard()

Subject.php : 92

Get the standard for this subject.

`public standard() : BelongsTo`

##### Return values

BelongsTo

#### teacherlink()

Subject.php : 112

Get teacher links for this subject.

`public teacherlink() : HasMany`

##### Return values

HasMany

## Search results