Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you define a route config with these parameters :</p> <pre><code>//... 'defaults' =&gt; array( 'controller' =&gt; 'index', 'action' =&gt; 'Index', ), //... </code></pre> <p>You need to make sure that you have your controller class associated to this key at the level of your controllers configuration:</p> <pre><code>'controllers' =&gt; array( 'invokables' =&gt; array( 'index' =&gt; 'Your\Controller\Namespace\YourController', //... ), ), </code></pre> <p>However, it recommended to define more "structured" keys (imagine you have different index controllers at the level of different modules ...) This can be easily achieved by adding a key corresponding to the controller namespace:</p> <pre><code>'defaults' =&gt; array( 'controller' =&gt; 'Index', 'action' =&gt; 'Index', '__NAMESPACE__'=&gt;'Your\Controller\Namespace' ), //... //Controllers configuration 'controllers' =&gt; array( 'invokables' =&gt; array( 'Your\Controller\Namespace\Index' =&gt; 'Your\Controller\Namespace\YourController', //... ), ), </code></pre> <p>[EDIT]</p> <p>Try with this (structured) config:</p> <pre><code>'admin' =&gt; array( 'type' =&gt; 'Segment', 'options' =&gt; array( 'route' =&gt; '/admin', 'defaults' =&gt; array( 'controller' =&gt; 'Index', 'action' =&gt; 'index', ), ), 'may_terminate' =&gt; true, 'child_routes' =&gt; array( '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( ), ), 'child_routes' =&gt; array( 'query'=&gt;array( 'type'=&gt;'Query', ) ) ), ), ), </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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