I have the following error even i had tried to call Doctrine ORM package in my propertyController. I don't know what i have missed.
Undefined method 'getDoctrine'.intelephense(1013)
namespace App\Controller;
use App\Entity\Property;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bridge\Doctrine\ManagerRegistry;
class propertyController extends AbstractController
{
/**
* @Route("/billets",name="property.index")
* @return Response
*/
public function index():Response{
$repostory= $this->getDoctrine()->getRepository(Property::class);
return $this->render("proprety/index.html.twig",[
'current_menu' => 'properties'
]);
}
}