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