TableGateWay problem

zend-db

#1

Hi Team,

i m new in Zend framework 3

i m developing album module using TableGateWay concept what ever the tutorial was given by Zend Documentation.But i m following this url
https://docs.zendframework.com/tutorials/getting-started/modules/

But i m getting this error.I m trying to solve the situation but i m unable to do it.I dont know how to solve this error.Please suggest me how to fix this error.
The Error is
Too few arguments to function Album\Controller\AlbumController::__construct(), 0 passed in C:\xampp\htdocs\zfblog-master\vendor\zendframework\zend-servicemanager\src\Factory\InvokableFactory.php on line 30 and exactly 1 expected

Still i m unable to do it.Please send the reply as early as possible

Thanks and Regards,
N.Dileep
Contact:9182782119


#2

It sounds like you need to update your module.config.php with the second code example found here: https://docs.zendframework.com/tutorials/getting-started/database-and-models/#back-to-the-controller

The error 0 passed in <snip>\zend-servicemanager\src\Factory\InvokableFactory.php means the controller is currently defined as an invokable and you have modified the controller to require a single parameter that needs to be passed in by a factory (in the code example the factory is defined as a function in the config file.)