StudentSchoolClass
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
Converts the binary UUID stored in the database into a string UUID.
Get the decrypted and formatted student ID.
Get the decrypted and formatted school class ID.
Relationship: Belongs to a student.
Relationship: Belongs to a school class.
Details
string|null
getIdAttribute(mixed $value)
Converts the binary UUID stored in the database into a string UUID.
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.
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.