for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Controller;
use App\Repository\TrickRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class HomeController extends AbstractController
{
/**
* @var TrickRepository
*/
private $repository;
public function __construct(TrickRepository $repository)
$this->repository = $repository;
}
* @Route("/", name="home")
public function index()
$tricks = $this->repository->findLatestEdited();
return $this->render('trick/index.html.twig', [
'tricks' => $tricks,
]);