# TableGateWay problem

**URL:** <https://discourse.laminas.dev/t/tablegateway-problem/507>\
**Category:** Components & MVC\
**Tags:** zend-db\
**Created:** [March 6, 2018, 2:03pm UTC](https://discourse.laminas.dev/t/tablegateway-problem/507 "2018-03-06T14:03:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dileep](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/dileep/32/308_2.png) [@Dileep](https://discourse.laminas.dev/u/Dileep)\
**Post date:** [March 6, 2018, 2:03pm UTC](https://discourse.laminas.dev/t/tablegateway-problem/507/1 "2018-03-06T14:03:45Z")

</div>

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/](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

---

<div class="post-metadata">

**Author:** ![Rockstar04](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/rockstar04/32/311_2.png) [@Rockstar04](https://discourse.laminas.dev/u/Rockstar04)\
**Post date:** [March 6, 2018, 9:40pm UTC](https://discourse.laminas.dev/t/tablegateway-problem/507/2 "2018-03-06T21:40:16Z")

</div>

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](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.)

---

<div class="post-metadata">

**Author:** ![enwods](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@enwods](https://discourse.laminas.dev/u/enwods)\
**Post date:** [November 28, 2018, 3:55pm UTC](https://discourse.laminas.dev/t/tablegateway-problem/507/3 "2018-11-28T15:55:29Z")

</div>

I have the same problem. Have you solved your problem?

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [November 28, 2018, 5:36pm UTC](https://discourse.laminas.dev/t/tablegateway-problem/507/4 "2018-11-28T17:36:47Z")

</div>

> [@enwods](#):
>
> Have you solved your problem?

@Rockstar04 already gave the right answer.
