23 lines
605 B
PHP
23 lines
605 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Controller;
|
||
|
|
||
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||
|
use Symfony\Component\HttpFoundation\Response;
|
||
|
use Symfony\Component\Routing\Annotation\Route;
|
||
|
use App\Repository\Entity1Repository;
|
||
|
|
||
|
class IndexController extends AbstractController
|
||
|
{
|
||
|
#[Route('/', name: 'app_index')]
|
||
|
public function index(Entity1Repository $repo): Response
|
||
|
{
|
||
|
$entity8 = $repo->findOneByName('entity 8');
|
||
|
|
||
|
return $this->render('index/index.html.twig', [
|
||
|
'controller_name' => 'IndexController',
|
||
|
'entity8' => $entity8
|
||
|
]);
|
||
|
}
|
||
|
}
|