postContainer = [ 'secondaryClass' => 'fw-container no-bottom-padding', 'tertiaryClass' => 'tagged-posts', 'slug' => 'news', 'category' => $locale === "fr" ? 'actualites' : 'news', ]; switch ($currentRoute) { case 'front.news.index': $this->postContainer['load_more'] = ucfirst(__('front.buttons.see_more_news')); break; case 'front.dynamic-pages.espace-presse': $this->postContainer = array_merge($this->postContainer, [ 'class' => 'fw-container no-top-padding', 'load_more' => ucfirst(__('front.buttons.see_more_docs')), 'type_button' => true ]); break; default: $this->postContainer['load_more'] = ucfirst(__('front.buttons.see_more_news')); break; } } /** * Get the view / contents that represent the component. * * @return View|Closure|string */ public function render(): View|Closure|string { return view('components.front.news.index-news-component', [ 'postContainer' => $this->postContainer ]); } }