Create a Docker image and deploy it
This commit is contained in:
1 parent
999dbee2c6
commit
ab95e3d286
13 files changed
+269
-2
No files matched your search
@@ -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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user