Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating new Module in Zend Studio (Zend Framework 2)
    text
    copied!<p>I have been following the tutorial from Zend (<a href="http://www.youtube.com/watch?feature=player_embedded&amp;v=EerB9bTvqrY" rel="nofollow">http://www.youtube.com/watch?feature=player_embedded&amp;v=EerB9bTvqrY</a>) however when I add a new Module in my project I can not navigate to it, are the instructions in this tutorial incorrect?</p> <p>Basically when I add a new Module in Zend Studio to my Zend Framework project I can not navigate to it, my new module is called "deals". I navigate to localhost/dealproject/deals and I get error 404. When navigating to localhost/dealproject/ it loads the zend skeleton application page correctly.</p> <p>Thanks for your help.</p> <p>module.config.php</p> <pre><code>&lt;?php return array( 'controllers' =&gt; array( 'invokables' =&gt; array( 'Deals\Controller\Deals' =&gt; 'Deals\Controller\DealsController', ), ), 'router' =&gt; array( 'routes' =&gt; array( 'deals' =&gt; array( 'type' =&gt; 'Literal', 'options' =&gt; array( // Change this to something specific to your module 'route' =&gt; '/deals', 'defaults' =&gt; array( // Change this value to reflect the namespace in which // the controllers for your module are found '__NAMESPACE__' =&gt; 'Deals\Controller', 'controller' =&gt; 'Deals', 'action' =&gt; 'index', ), ), 'may_terminate' =&gt; true, 'child_routes' =&gt; array( // This route is a sane default when developing a module; // as you solidify the routes for your module, however, // you may want to remove it and replace it with more // specific routes. 'default' =&gt; array( 'type' =&gt; 'Segment', 'options' =&gt; array( 'route' =&gt; '/[:controller[/:action]]', 'constraints' =&gt; array( 'controller' =&gt; '[a-zA-Z][a-zA-Z0-9_-]*', 'action' =&gt; '[a-zA-Z][a-zA-Z0-9_-]*', ), 'defaults' =&gt; array( ), ), ), ), ), ), ), 'view_manager' =&gt; array( 'template_path_stack' =&gt; array( 'Deals' =&gt; __DIR__ . '/../view', ), ), </code></pre> <p>);</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload