我试图在Symfony 3中通过SwiftMailer发送一封电子邮件。我正在阅读该教程:和我在“在控制器中创建表单”中遇到了问题:“试图调用类的名为"getRequest”的未定义方法“"AppBundle\Controller\DefaultController”。// the form if they refresh the page
return $this->redirect($this->generateUrl('ap
注释掉这一行后,当我试图从控制器获取服务时,我得到了这样的消息:
Service "synd_multitenant.tenant" not found: even though it exists inthe app's container, the container inside "App\Controller\DefaultController" is a smaller service locator下面是我尝试使用服务的控制器
我读了很多关于这个的话题,但我似乎找不到解决我的问题的方法。错误是FatalErrorException: Error:对vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.phpthrow new \LogicException('The Doctrine