self::Manager, 'viewer' => self::Viewer, default => null, }; } public function label(): string { return $this->name; } public static function labels(): array { return collect(self::cases())->mapWithKeys(function ($role) { return [$role->value => $role->label()]; })->toArray(); } }