pull/27/head
remrem 10 months ago
parent 50460c409d
commit 2f39293c4a

@ -9,19 +9,14 @@ use Symfony\Component\Routing\Attribute\Route;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use App\Entity\Post; use App\Entity\Post;
use App\Form\Type\PostType; use App\Form\Type\PostType;
use App\Form\Type\CommentType; use App\Form\CommentType;
use App\Form\Type\SimpleSearchType; use App\Form\Type\SimpleSearchType;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class PostController extends AbstractController class PostController extends AbstractController
{ {
private EntityManagerInterface $em; public function __construct(private EntityManagerInterface $em){}
public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
}
#[Route('/', name: 'all_posts', methods: ['GET'])] #[Route('/', name: 'all_posts', methods: ['GET'])]
public function getAllPost(): Response public function getAllPost(): Response

Binary file not shown.
Loading…
Cancel
Save