src/Controller/Seo/RobotsController.php line 14

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Controller\Seo;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. class RobotsController extends AbstractController
  8. {
  9. #[Route("robots.txt", name: "robots_txt")]
  10. public function index(): Response
  11. {
  12. $response = $this->render('seo/robots.html.twig');
  13. $response->headers->set('Content-Type', 'text/plain');
  14. return $response;
  15. }
  16. }