for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Controller\Image;
use App\Entity\Image;
use App\Repository\ImageRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**
* @Route("/image", name="image_")
*/
class ImageController extends AbstractController
{
* @Route("/{id}", name="show", methods={"GET"})
public function show(Image $image, ImageRepository $imageRepository): Response
$prev = $imageRepository->findPrev($image);
$next = $imageRepository->findNext($image);
return $this->render('/image/show.html.twig', [
'image' => $image,
'prev' => $prev,
'next' => $next
]);
}