'Alle', 'villen' => 'Villen', 'penthouse' => 'Penthouse', 'loft' => 'Loft', ]; $this->filters = $filters; $this->activeFilter = 'alle'; $this->theme = config('app.theme', 'b2in'); $portfolio = cms_theme_section('portfolio', $this->theme); if (! is_array($portfolio)) { $portfolio = []; } $this->content = $portfolio; $this->filters = $portfolio['filters'] ?? $filters; } public function filterBy(string $category): void { $this->activeFilter = $category; } public function openModal(array $project): void { $this->selectedProject = $project; $this->showModal = true; } public function closeModal(): void { $this->showModal = false; $this->selectedProject = null; } public function getFilteredProjects(): array { $projects = $this->content['projects'] ?? []; if ($this->activeFilter === 'alle') { return $projects; } return array_filter($projects, function ($project) { return strtolower($project['category']) === strtolower($this->activeFilter); }); } public function render() { return view('livewire.web.components.sections.portfolio'); } }