<?php
namespace App\Controller;
use App\Repository\OfferingRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Twig\Environment;
class AppController extends AbstractController
{
#[Route('/', name: 'homepage')]
public function index(Environment $twig, OfferingRepository $offeringRepository): Response
return new Response($twig->render('app/index.html.twig', [
'offerings' => $offeringRepository->findAll(),
]));
}
#[Route('/user', name: 'user_page')]
public function user(): Response
return $this->render('app/user.html.twig', [
'user' => $this->getUser(),
]);