create imprint
This commit is contained in:
parent
4aeb6aa8a3
commit
0ed1eef5ff
2 changed files with 240 additions and 10 deletions
|
@ -2,9 +2,6 @@
|
|||
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Repository\OfferingRepository;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
@ -13,16 +10,15 @@ use Twig\Environment;
|
|||
|
||||
class AppController extends AbstractController
|
||||
{
|
||||
private $entityManager;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager)
|
||||
#[Route('/', name: 'homepage')]
|
||||
public function index(): Response
|
||||
{
|
||||
$this->entityManager = $entityManager;
|
||||
return $this->render('app/index.html.twig');
|
||||
}
|
||||
|
||||
#[Route('/', name: 'homepage')]
|
||||
public function index(Environment $twig, OfferingRepository $offerRepository): Response
|
||||
#[Route('/imprint', name: 'imprint')]
|
||||
public function imprint(): Response
|
||||
{
|
||||
return new Response($twig->render('app/index.html.twig'));
|
||||
return $this->render('app/imprint.html.twig');
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue