'datetime', ]; /** * Map attribute names to enum classes. * * @var array */ protected $enumCasts = [ 'role' => UserRole::class ]; /** * Check if user is admin. * * @return boolean */ public function isAdmin(): bool { return $this->role->equals(UserRole::admin()); } /** * Check if user is local. * ! IS local no CRM ! * * @return boolean */ public function isLocal(): bool { return true; } }