'settings'])] #[Lazy] class Index extends Component { public static function placeholder(array $params = []): View { return view('components.skeleton.page', ['rows' => 4]); } #[Url(as: 'section', keep: true)] public string $section = 'profile'; /** @var array */ protected array $allowedSections = ['profile', 'language', 'security', 'notifications', 'danger']; public function mount(): void { if (! in_array($this->section, $this->allowedSections, true)) { $this->section = 'profile'; } } public function setSection(string $section): void { if (in_array($section, $this->allowedSections, true)) { $this->section = $section; } } public function render(): View { return view('livewire.settings.index'); } }