getting exception : Service 'db' wasn't found in the dependency injection container in Phalcon

江枫思渺然 提交于 2019-12-06 12:45:36

I encountered this issue before and the fix was the following:
I had two instances of:
$di = new FactoryDefault();
I had one in my index.php and one in my services.php file.
I removed the one in my index.php file, and it got rid of the error.

change the order of all the $di calls it worked for me

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!