src/Controller/IndexController.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\Request;
  5. use Symfony\Component\HttpFoundation\Response;
  6. class IndexController extends AbstractController
  7. {
  8.     public function index(Request $request): Response
  9.     {
  10.         $env $this->getParameter('kernel.environment');
  11.         if (in_array($env, ['dev''test''review'])) {
  12.             return $this->render('index/index.html.twig', ['env' => $env'host' => $request->getHost(), 'scheme' => $request->getScheme()]);
  13.         }
  14.         throw $this->createNotFoundException();
  15.     }
  16. }