You've already forked symfony-playground
simulation model
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Entity\MerParaSub;
|
||||
use App\Repository\MerParaSubRepository;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
@ -11,11 +13,15 @@ use App\Repository\Entity1Repository;
|
||||
class IndexController extends AbstractController
|
||||
{
|
||||
#[Route('/', name: 'app_index')]
|
||||
public function index(Entity1Repository $repo): Response
|
||||
public function index(Entity1Repository $repo, MerParaSubRepository $subRepo): Response
|
||||
{
|
||||
$sm = $repo->getSchemaManager();
|
||||
$entity8 = $repo->findOneByName('entity 8');
|
||||
|
||||
$sub = $subRepo->findOneById(1);
|
||||
dump($sub);
|
||||
dump($sub->getService());
|
||||
|
||||
return $this->render('index/index.html.twig', [
|
||||
'controller_name' => 'IndexController',
|
||||
'entity8' => $entity8,
|
||||
|
Reference in New Issue
Block a user