Search code examples
zend-framework2zend-tool

Zend Framework 2 ZF tool creating controller


When I try to create a new controller in my Zend Framework 2.4 application, using the following ZF Tool command:

zf create controller Author index-action-included=1 Author C:\wamp\www\ZendApp

I get the following error:

Reason for failure: Invalid arguments or no arguments provided

But when I remove index-action-included=1, ZF Tool creates a controller without any problems.

What I'm missing?


Solution

  • If you want to create the index action, it is created by default. However if you don't want to create it I think it should be something like this:

    zf create controller Author Author C:\wamp\www\ZendApp 0