*/ use HasFactory, Notifiable; protected $fillable = [ 'name', 'email', 'password', 'phone', 'role', 'is_active', ]; protected $hidden = [ 'password', 'remember_token', ]; protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', 'is_active' => 'boolean', 'role' => \App\Enums\UserRole::class, ]; } public function isSuperAdmin(): bool { return $this->role === \App\Enums\UserRole::SuperAdmin; } public function isTrackingOperator(): bool { return $this->role === \App\Enums\UserRole::TrackingOperator; } public function isDataEntry(): bool { return $this->role === \App\Enums\UserRole::DataEntry; } public function isCustomer(): bool { return $this->role === \App\Enums\UserRole::Customer; } }