├── api Api directory
│ ├── components api commponents
│ ├── config all config files
│ ├── controllers
│ │ ├── BaseController.php
│ │ └── SiteController.php
│ ├── models inherit models in common/models/ mostly
│ ├── modules
│ │ ├── base Funboot base module
│ │ │ ├── controllers
│ │ │ ├── views
│ │ │ └── Module.php module bootstrap file
│ │ └── school self-defined module
│ │ ├── controllers
│ │ ├── views
│ │ └── Module.php module bootstrap file
│ ├── runtime save running log/cache, etc
│ │ ├── cache cache files, delete all files and directory while clear cache
│ │ └── logs log
│ └── tests
│
├── backend App backend
│ ├── assets
│ ├── config all config files
│ ├── controllers
│ │ ├── BaseController.php Base controller, provide common curd and rbac
│ │ └── SiteController.php Contoller related to login/logout, without rbac
│ ├── models inherit models in common/models/ mostly
│ ├── modules
│ │ ├── base Funboot base module
│ │ │ ├── controllers
│ │ │ ├── views
│ │ │ └── Module.php module bootstrap file
│ │ ├── pay ** Funpay subsystem **
│ │ │ ├── controllers
│ │ │ ├── views
│ │ │ └── Module.php
│ │ └── school self-defined module
│ │ ├── controllers
│ │ ├── views
│ │ └── Module.php module bootstrap file
│ ├── runtime save running log/cache, etc
│ │ ├── cache cache files, delete all files and directory while clear cache
│ │ └── logs log
│ ├── tests
│ └── views
│ ├── layout
│ └── site SiteController default view file
│
├── common common directory
│ ├── components common components
│ │ ├── gii Funboot gii code generator
│ │ └── uploader component for upload file
│ ├── config config files
│ ├── helpers inherit Yii Helpper, functions with static
│ ├── mails email
│ ├── job queue job
│ ├── models
│ │ ├── BaseModel.php Base Model for Funboot model to inherit
│ │ ├── base models directory of base
│ │ │ ├── UserModel Generated by Gii, can be re-generated while field modified
│ │ │ └── UserBase Write code related to model here, donot re-generated this file again
│ │ └── school self-defined module
│ ├── messages ** i18n translation file directory **
│ ├── service multiple table query
│ ├── widgets for rendering html, non contain controller here
│
├── console
│ ├── config config files
│ ├── controllers
│ │ ├── BaseController.php Base controller, provide common functions
│ │ └── HeartBeatController.php heart beat controller
│ ├── migrations database migration
│ ├── models inherit models in common/models/ mostly
│ ├── runtime save running log/cache, etc
│ │ ├── cache cache files, delete all files and directory while clear cache
│ │ └── logs log
│
├── frontend App frontend
│ ├── assets
│ ├── config all config files
│ ├── controllers
│ │ ├── BaseController.php Base controller, provide common curd
│ │ └── SiteController.php Contoller related to login/logout
│ ├── models inherit models in common/models/ mostly
│ ├── modules
│ │ ├── base Funboot base module
│ │ │ ├── controllers
│ │ │ ├── views
│ │ │ └── Module.php module bootstrap file
│ │ ├── pay ** Funpay subsystem **
│ │ │ ├── controllers
│ │ │ ├── views
│ │ │ └── Module.php
│ │ └── school self-defined module
│ │ ├── controllers
│ │ ├── views
│ │ └── Module.php module bootstrap file
│ ├── runtime save running log/cache, etc
│ │ ├── cache cache files, delete all files and directory while clear cache
│ │ └── logs log
│ ├── tests
│ └── views
│ ├── layout
│ └── site SiteController default view file
│
├── web website root access directory
│ ├── attachment user upload image and file directory
│ ├── backend backend static directory
│ │ └── resources resources
│ └── resources static file for frontend
└── composer.json composer file
- backend/controllers includes BaseController and SiteController, all backend controller should inherit BaseController, login/logout is in SiteController
- modules/base/controller funboot base funcitons
- modules/your/controller your module, can be generated by Gii
Recommend to use module. If small project you can write controller in backend/controllers also.
- /common/components Common Components, you can use it in controllers.
- /common/helpers Common functions. functions with static, helper does not access database directly.
- /common/services multiple table query
- /common/widgets for rendering html, non contain controller here