name($name); $this->statePath($name); } public static function make(string $name): static { $static = app(static::class, ['name' => $name]); $static->configure(); return $static; } public function getId(): string { return parent::getId() ?? $this->getStatePath(); } public function getLabel(): string | Htmlable | null { $label = parent::getLabel() ?? (string) str($this->getName()) ->before('.') ->kebab() ->replace(['-', '_'], ' ') ->ucfirst(); return (is_string($label) && $this->shouldTranslateLabel) ? __($label) : $label; } public function getKey(): string { return parent::getKey() ?? $this->getStatePath(); } }