title: Yii2 - Create module using Advanced template
body: <p>I understand building a module is like a mini Yii2 application. I am trying to build a Blog module to reuse on different projects. </p>
  
  <p>I would like to create a module containing backend and frontend and then being able to access each side.</p>
  
  <p>In Yii2 basic there is no backend and frontend, so I create the "modules" folder on the app root. In the case of Yii2 advanced since we have backend and frontend.</p>
  
  <p>All tutorials only show creating a module for backend or frontend.</p>
  
  <p>I am creating a folder "modules" inside common. Inside module I am creating a folder "blog" with the following structure:</p>
  
  <pre><code>blog
  L backend
  L frontend
  L common
  </code></pre>
  
  <p>what is the correct way to create and configure a module?</p>
  
  <p><strong>UPDATE</strong>
  I have found this <a href="https://github.com/samdark/yii2-cookbook/blob/master/book/structure-backend-frontend-modules.md" rel="nofollow noreferrer">article</a> from @samdark, where He gives an example of the configuration, I am showing the configuration according to my structure:</p>
  
  <pre><code>'modules' =&gt; [
    'blogFrontend' =&gt; [
      'class' =&gt; 'common\blog\frontend\Blog',
      'anonymousComments' =&gt; false,
    ],
    'blogBackend' =&gt; [
      'class' =&gt; 'common\blog\backend\Blog',
    ],
  ]
  </code></pre>