class StudentSchoolClass extends BaseModel (View source)

Represents the pivot table linking students and school classes.

Provides relationships to the Student and SchoolClass models.

Properties

bool $incrementing

Indicates that the model does not use auto-incrementing IDs.

from  BaseModel
protected string $keyType

The data type of the primary key ID.

from  BaseModel
bool $timestamps

Indicates if the model should not use timestamps.

protected string $table

The database table associated with the model.

protected array<int,string> $fillable

The attributes that are mass assignable.

Methods

string|null
getIdAttribute(mixed $value)

Converts the binary UUID stored in the database into a string UUID.

static void
boot()

Boot function for the model.

string|null
getStudentIdAttribute(null|string $value)

Get the decrypted and formatted student ID.

string|null
getSchoolClassIdAttribute(null|string $value)

Get the decrypted and formatted school class ID.

BelongsTo
student()

Relationship: Belongs to a student.

BelongsTo
schoolClass()

Relationship: Belongs to a school class.

Details

string|null getIdAttribute(mixed $value)

Converts the binary UUID stored in the database into a string UUID.

Parameters

mixed $value

binary value from the database

Return Value

string|null

UUID in string format, or null if not set

static protected void boot()

Boot function for the model.

This ensures that every new record automatically gets a UUID assigned if no ID is provided during creation.

Return Value

void

string|null getStudentIdAttribute(null|string $value)

Get the decrypted and formatted student ID.

Parameters

null|string $value

Binary UUID

Return Value

string|null

String UUID

string|null getSchoolClassIdAttribute(null|string $value)

Get the decrypted and formatted school class ID.

Parameters

null|string $value

Binary UUID

Return Value

string|null

String UUID

BelongsTo student()

Relationship: Belongs to a student.

Return Value

BelongsTo

BelongsTo schoolClass()

Relationship: Belongs to a school class.

Return Value

BelongsTo