Just started to get acquainted with yii, I don’t know anything at all

Download, run on a local server

And immediately a few questions appeared.

I want to make a small cms-ku

How can you make a structure like this on yii?

http: //site.qq/

http: //site.qq/admin/

those. separate admin, separate site itself

And how can you somehow realize the possibility of expanding the cis with the help of modules?

those. let's say there is a folder http: //site.qq/modules/

In which there are modules, let's say for payment, etc. and through the admin panel they can be connected to the CMS or switched off

those. Is it generally easy to do or is it already done there? or that the admin that the site there is no separation?

    2 answers 2

    The answer to the first question: If you write SMS, then you need to create a master module so that all modules inherit from there and in this module the master controller should be divided into two (inherit two controllers) Frontcontroller and Backcontroller and from there you will inherit.

    Here it is written on Habré how to do it but for small projects http://habrahabr.ru/post/117457/ But I didn’t like it, maybe you can get it from there

    The second question: you can expand with the modules as much as you like.

      I am also learning yii, I started sawing a blog example: https://github.com/ram0973/yiiblog in the protected folder created the backend folder, the admin panel is completely there, and at the root are 2 entry points - index.php and backend.php. The root .htaccess line is added RewriteRule ^ backend backend.php. (There is a jumble in the backend folder, but everything works :)). Admin and home are 2 different applications.

      And there is also a project yupe.ru - ready CMF, in it you can just turn on / off modules.

      And there is also an example of the application yii2 - https://github.com/yiisoft/yii2-app-advanced

      More https://github.com/clevertech/YiiBoilerplate