repo = $this->em->getRepository(MerchantInterface::class); } public function edit(){ $merchant = new Merchant(); $merchant->setCreatedBy($this->user); $merchant->setUpdatedBy($this->user); $this->em->persist($merchant); $this->em->flush(); die(); $merchant = $this->repo->find($id); dump($merchant); return $this->render('@LcShop/merchant/edit.html.twig', [ ]); } public function list(){ return $this->render('merchant/index.html.twig', [ 'controller_name' => 'MerchantController', ]); } }