'Article', ])] class Index extends Component { public bool $isDetail = false; public ?string $slug = null; public function mount(?string $slug = null) { if ($slug) { $this->isDetail = true; $this->slug = $slug; } } public function render() { return view( $this->isDetail ? 'livewire.home.article.show' : 'livewire.home.article.index' ); } }