collection-crud/src/Controller/DefaultController.php

20 lines
632 B
PHP
Raw Normal View History

2018-07-18 11:35:27 -04:00
<?php declare(strict_types=1);
2017-11-30 15:06:13 -05:00
namespace App\Controller;
2017-11-30 15:06:13 -05:00
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
2022-03-03 11:15:12 -05:00
use Symfony\Component\HttpFoundation\{Request, Response};
2018-07-11 09:18:46 -04:00
use Symfony\Component\Routing\Annotation\Route;
2017-11-30 15:06:13 -05:00
class DefaultController extends AbstractController
2017-11-30 15:06:13 -05:00
{
2022-03-03 10:53:48 -05:00
#[Route(path: '/', name: 'homepage')]
public function indexAction(Request $request): Response
{
// replace this example code with whatever you need
return $this->render('default/index.html.twig', [
'base_dir' => realpath($this->getParameter('kernel.project_dir')) . DIRECTORY_SEPARATOR,
]);
}
2017-11-30 15:06:13 -05:00
}