StudentSchoolClass
class StudentSchoolClass extends BaseModel (View source)
Represents the view vw_student_school_class, which links students and school classes,
including decrypted and formatted personal data (CPF, email, phone) for display and filtering.
Properties
| bool | $timestamps | ||
| protected string | $table | ||
| protected array<int,string> | $guarded | ||
| $hidden |
Methods
Prevents saving, enforcing read-only behavior for view models.
Converts binary UUID (BLOB) to string representation.
Converts the binary UUID of the student to a string.
Converts the binary UUID of the school class to a string.
Decrypts and formats the student's CPF.
Decrypts and returns the student's email.
Decrypts and formats the student's phone number.
Defines the relationship between the record and its corresponding student.
Defines the relationship between the record and its corresponding school class.
Retrieves unique combinations of course, period, term, and borrowing permission to be used as filter data.
Details
save(array $options = [])
Prevents saving, enforcing read-only behavior for view models.
string|null
getIdAttribute(null|string $value)
Converts binary UUID (BLOB) to string representation.
null|string
getStudentIdAttribute(null|string $value)
Converts the binary UUID of the student to a string.
null|string
getSchoolClassIdAttribute(null|string $value)
Converts the binary UUID of the school class to a string.
string|null
getCpfAttribute(null|string $value)
Decrypts and formats the student's CPF.
Example output: 123.456.789-00
string|null
getEmailAttribute(null|string $value)
Decrypts and returns the student's email.
string|null
getPhoneAttribute(null|string $value)
Decrypts and formats the student's phone number.
Example output: (12) 34567-8901
BelongsTo
student()
Defines the relationship between the record and its corresponding student.
BelongsTo
schoolClass()
Defines the relationship between the record and its corresponding school class.
static Collection
getFilterData(null|Builder $query = null)
Retrieves unique combinations of course, period, term, and borrowing permission to be used as filter data.