$this->projects()]); } public function about(): Response { return Inertia::render('site/about', ['projects' => $this->projects()]); } public function services(): Response { return Inertia::render('site/services'); } public function clients(): Response { $locale = app()->getLocale(); return Inertia::render('site/clients', [ 'projects' => $this->projects(), 'testimonials' => Testimonial::query() ->published() ->get() ->map(fn (Testimonial $testimonial) => $testimonial->localized($locale)), ]); } public function contact(): Response { return Inertia::render('site/contact'); } /** * @return Collection */ private function projects(): Collection { return Project::query() ->latestFirst() ->get(['id', 'title', 'client', 'year', 'sector', 'program', 'scope']); } }