Student
class Student extends BaseModel (View source)
Represents a view model for students.
This model maps to the database view vw_students, which stores
decrypted and formatted student data for display and processing.
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.
Decrypts and returns the student's CPF.
Decrypts and returns the student's email.
Decrypts and formats the student's phone number.
Defines the many-to-many relationship between students and school classes.
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.
string|null
getCpfAttribute(null|string $value)
Decrypts and returns the student's CPF.
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
BelongsToMany
schoolClasses()
Defines the many-to-many relationship between students and school classes.
Uses the view vw_student_school_class as the pivot table.