src/Flexy/FrontBundle/Controller/PagesController.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Flexy\FrontBundle\Controller;
  3. use App\Flexy\ShopBundle\Repository\Product\ProductRepository;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. #[Route('/pages')]
  8. class PagesController extends AbstractController
  9. {
  10.     #[Route('/about-us'name'about_us')]
  11.     public function about_us(ProductRepository $productRepository): Response
  12.     {
  13.         return $this->render('@Flexy\FrontBundle/templates/pages/about-us.html.twig');
  14.     }
  15.     #[Route('/contact'name'front_contact')]
  16.     public function contact(ProductRepository $productRepository): Response
  17.     {
  18.         return $this->render('@Flexy\FrontBundle/templates/home/contact.html.twig', [
  19.             'products' => $productRepository->findAll(),
  20.         ]);
  21.     }
  22.     #[Route('/refund'name'refund_order')]
  23.     public function refund(ProductRepository $productRepository): Response
  24.     {
  25.         return $this->render('@Flexy\FrontBundle/templates/home/refundOrder.html.twig');
  26.     }
  27. }