Different versions in a module

Not sure if this is possible or how it should been done, but is there a way to use different versions inside a module?

When i view the page it will show me the version 1 renders.



On a side note, as im working on a small api feed is it wish to add the modules in the frontend folder rather in the backend folder or perhaps a own root dir?

+ frontend

  + modules

    + v1

      + all stuff

    + v2

      + all stuff

    'modules' => [

        'api' => [

            'class' => 'frontend\modules\api\v1\Module',



For REST app interface use separate application:

  • api

– v1

– v2

  • backend

  • common

  • frontend