collection-crud/src/Controller/DefaultController.php

19 lines
593 B
PHP
Raw Permalink 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
2023-07-21 10:35:15 -04:00
class DefaultController extends AbstractController {
#[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
}