f3->get('GET.page') ?: 1)); $result = (new Post())->page($page, 12); $this->render('site/home.html', [ 'pageTitle' => 'Articles', 'posts' => $result['items'], 'pagination' => $result['pagination'], 'paginationAlias' => 'home', ], 300); } public function show(): void { $post = (new Post())->findBySlug((string) $this->f3->get('PARAMS.slug')); if ($post === null) { $this->f3->error(404); return; } $this->render('site/post.html', [ 'pageTitle' => $post['title'], 'metaDescription' => $post['excerpt'], 'post' => $post, ], 300); } }