'datetime', ]; public function cawangan_kerja(): HasOne { return $this->hasOne(Cawangan::class, 'kodcaw', 'cawangan'); } public function canImpersonate(): bool { return in_array($this->roles ?? '', ['admin'], true); } public function canBeImpersonated(): bool { return ($this->roles ?? '') !== 'admin'; } }