You've already forked symfony-playground
sub
This commit is contained in:
@ -2,8 +2,11 @@
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Repository\MerBeSubRepository;
|
||||
use App\Repository\MerParaSubRepository;
|
||||
use App\Repository\MerServiceRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use App\Repository\Entity1Repository;
|
||||
@ -11,18 +14,38 @@ use App\Repository\Entity1Repository;
|
||||
class IndexController extends AbstractController
|
||||
{
|
||||
#[Route('/', name: 'app_index')]
|
||||
public function index(Entity1Repository $repo, MerParaSubRepository $subRepo): Response
|
||||
public function index(
|
||||
Entity1Repository $repo,
|
||||
MerParaSubRepository $paraSubRepo,
|
||||
MerBeSubRepository $beSubRepo
|
||||
): Response
|
||||
{
|
||||
// repo dummy
|
||||
$sm = $repo->getSchemaManager();
|
||||
|
||||
$sub = $subRepo->findOne();
|
||||
dump($sub);
|
||||
dump($sub->getService());
|
||||
foreach ($paraSubRepo->findAll() as $sub) {
|
||||
dump($sub);
|
||||
}
|
||||
|
||||
dump('-------------------');
|
||||
|
||||
foreach ($beSubRepo->findAll() as $sub) {
|
||||
dump($sub);
|
||||
}
|
||||
|
||||
return $this->render('index/index.html.twig', [
|
||||
'controller_name' => 'IndexController',
|
||||
'schemaManager' => $sm
|
||||
'schemaManager' => $sm,
|
||||
//'offer_id' => $sub->getService()->ge
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route('/notification/dm', name: 'notification_dm')]
|
||||
public function notificationDm(Request $request, MerServiceRepository $repo): Response
|
||||
{
|
||||
foreach ($repo->findByOfferId($request->query->get('offer_id')) as $sub) {
|
||||
dump($sub);
|
||||
}
|
||||
|
||||
return $this->render('index/notificationDm.html.twig');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user