|
@@ -13,12 +13,12 @@ use Symfony\Component\Routing\Annotation\Route;
|
|
|
|
|
|
class PageController extends AbstractController
|
|
|
{
|
|
|
- #[Route('/p/{name}', name: 'app_page_show', methods: ['GET'])]
|
|
|
- public function showPage(PageRepository $pageRepository, string $name): Response
|
|
|
+ #[Route('/p/{id}', name: 'app_page_show', methods: ['GET'])]
|
|
|
+ public function showPage(PageRepository $pageRepository, string $id): Response
|
|
|
{
|
|
|
- $page = $pageRepository->find($name);
|
|
|
+ $page = $pageRepository->find($id);
|
|
|
if (!$page) {
|
|
|
- throw $this->createNotFoundException('La page ' . $name . ' n\'existe pas.');
|
|
|
+ throw $this->createNotFoundException('La page ' . $id . ' n\'existe pas.');
|
|
|
}
|
|
|
|
|
|
return $this->render('page/index.html.twig', [
|