Create a Docker image and deploy it

This commit is contained in:
2024-06-05 10:17:54 +02:00
parent 999dbee2c6
commit ab95e3d286
13 changed files with 269 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Controller;
use App\Repository\PostRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
class PostController extends AbstractController
{
#[Route('/', name: 'app_posts')]
public function index(PostRepository $repository): Response
{
$posts = $repository->findAll();
return $this->render('post/index.html.twig', [
'posts' => $posts,
]);
}
}