*/ use HasFactory, Notifiable, HasRoles; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'name', 'email', 'password', // Intentionally kept: required for registration factory and seeding. // Sensitive — never pass unvalidated user input directly. // email_verified_at and remember_token are intentionally excluded. ]; /** * The attributes that should be hidden for serialization. * * @var list */ protected $hidden = [ 'password', 'remember_token', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', ]; } public function company() { return $this->belongsTo(Company::class); } // Many-to-many with projects public function projects() { return $this->belongsToMany(Project::class)->withPivot('role_in_project')->withTimestamps(); } // Progress updates made public function progressUpdates() { return $this->hasMany(ProgressUpdate::class); } }