src/Controller/ApiController.php

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\Routing\Annotation\Route;
  5. class ApiController extends AbstractController
  6. {
  7.     /**
  8.      * @Route("/api", name="api")
  9.      */
  10.     public function index()
  11.     {
  12.         return $this->render('api/index.html.twig', [
  13.             'controller_name' => 'ApiController',
  14.         ]);
  15.     }
  16. }