Réponse

ProductRepository $productRepository

Colonne
Explication

Exemple complet :
public function index(ProductRepository $productRepository){
return $this->render("products/index.html.twig", [
'product'=>$productRepository->findAll()]);
}

Question

Pour avoir la possibilité d'effectuer des requêtes sur ma table produits (entity Product), que faut-il passer en paramètre de la fonction index du contrôleur ProductController ?

Thématique