*/ use HasFactory, Notifiable; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'name', 'first_name', 'last_name', 'phone', 'email', 'role', 'password', 'active', 'needs_password_change', 'activation_token', ]; /** * The attributes that should be hidden for serialization. * * @var list */ protected $hidden = [ 'password', 'remember_token', 'activation_token', 'created_at', 'updated_at', 'email_verified_at', 'active', 'needs_password_change' ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', 'active' => 'boolean', 'needs_password_change' => 'boolean' ]; } /** * Get the student data associated with the user. */ public function studentData() { return $this->hasOne(StudentData::class, 'user_id'); } /** * Get the internships for the user. */ public function internships() { return $this->hasMany(Internship::class, 'user_id'); } }