title: The best way to include all controllers in yii2 rest urlmanager
body: <p>I am using Yii2 rest service. I want to include all my controllers in rest url manager. Now I have config main.php like below:</p>
  
  <pre><code>    'urlManager' =&gt; [
          'enablePrettyUrl' =&gt; true,
          'enableStrictParsing' =&gt; false,
          'showScriptName' =&gt; false,
          'rules' =&gt; [
              ['class' =&gt; 'yii\rest\UrlRule', 'controller' =&gt; 'user'],
              ['class' =&gt; 'yii\rest\UrlRule', 'controller' =&gt; 'usera'],
              ['class' =&gt; 'yii\rest\UrlRule', 'controller' =&gt; 'userb'],
              ['class' =&gt; 'yii\rest\UrlRule', 'controller' =&gt; 'userc'],
              ['class' =&gt; 'yii\rest\UrlRule', 'controller' =&gt; 'userd'],
          ],
      ],
  </code></pre>
  
  <p>Can I use something like this, so I do not have to include every controller in the config file?</p>
  
  <pre><code>    'urlManager' =&gt; [
          'enablePrettyUrl' =&gt; true,
          'enableStrictParsing' =&gt; false,
          'showScriptName' =&gt; false,
          'rules' =&gt; [
              ['class' =&gt; 'yii\rest\UrlRule', 'controller' =&gt; '*'],
          ],
      ],
  </code></pre>