src/Controller/IndexController.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\Response;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. use Symfony\Component\HttpFoundation\Request;
  7. class IndexController extends AbstractController
  8. {
  9.     private $request;
  10.     public function __construct(){
  11.         $this->request Request::createFromGlobals();
  12.     }
  13.     #[Route('/'name'index')]
  14.     public function index(): Response
  15.     {
  16.         return $this->render('index/index.html.twig', [
  17.             'controller_name' => 'IndexController',
  18.         ]);
  19.     }
  20.     
  21.     /*#[Route('/login', name: 'login')]
  22.     public function login(): Response
  23.     {
  24.         return $this->render('ajax/login.html.twig');
  25.     }*/
  26. }