Quantcast
Channel: Grafikart | Derniers Sujets du forum
Viewing all articles
Browse latest Browse all 1542

A la decouverte de Doctrine

$
0
0

Bonjour,

je debute avec Symfony et je suis le tutoriel Symfony par l'exemple et je bloque déja au 3 chapitre (à la decouverte de Doctrine).
quand je clique sur lien mon-premier-bien-1 (comme dans la video 00:39:00) au lieu de d'afficher ma vue "show.html.twig" je tombe sur cette erreur:
Case mismatch between loaded and declared class names: "App\controller\PropertyController" vs "App\Controller\PropertyController".

voici ma class PropertyController

<?php

namespace App\Controller;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\ORM\EntityManagerInterface;
use App\Repository\PropertyRepository;
use App\Entity\Property;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Twig\Environment;

class PropertyController extends AbstractController

{
/**
* @var PropertyRepository
/
private $repository;
/
*
* @var ObjectManager
*/
private $em;

public function __construct(PropertyRepository $repository, ObjectManager $em)
{
    $this->repository = $repository;
    $this->em = $em;
}


public function index()

{


    return $this->render('property/index.html.twig',[
        'current_menu' => 'properties'
    ]);
}
  /**
   * @return Response
   */
public function show($slug, $id): Response
{
    $property = $this->repository->find($id);
    return $this->render('property/show.html.twig',[
        'property' =>$property,
        'current_menu' => 'properties'
    ]);
}

}
je voudrais solliciter votre aide et expertise pour continuer mon apprentissage


Viewing all articles
Browse latest Browse all 1542

Trending Articles