Yii 2 Basic Application Template is a skeleton Yii 2 application best for rapidly creating small projects.
It includes all commonly used configurations that would allow you to focus on adding new features to your application.
assets/ contains assets definition
commands/ contains console commands (controllers)
config/ contains application configurations
controllers/ contains Web controller classes
mail/ contains view files for e-mails
models/ contains model classes
runtime/ contains files generated during runtime
tests/ contains various tests for the basic application
vendor/ contains dependent 3rd-party packages
views/ contains view files for the Web application
web/ contains the entry script and Web resources
- Sign in, Sign up, etc
- OAuth authorization
- User management
- RBAC with predefined
guest
,user
andadmin
roles - RBAC migrations support
- Content management components: cms, comments
- Yii2 component for logging cron jobs
The minimum requirement by this application template that your Web server supports PHP 5.4.0.
If you do not have Composer, follow the instructions in the Installing Yii section of the definitive guide to install it.
With Composer installed, you can then install the application using the following commands:
composer global require "fxp/composer-asset-plugin:~1.1.1"
composer create-project --prefer-dist --stability=dev yii2mod/base application
The first command installs the composer asset plugin
which allows managing bower and npm package dependencies through Composer. You only need to run this command
once for all. The second command installs the yii2mod/base application in a directory named application
.
You can choose a different directory name if you want.
After you install the application, you have to conduct the following steps to initialize the installed application. You only need to do these once for all.
-
Create a new database and adjust the
components['db']
configuration inconfig/main-local.php
accordingly. -
Apply migrations with console command
yii migrate
. -
Set document root of your web server to
/path/to/application/web/
folder.
####To login into the application, use the following credentials:
- email -
[email protected]
- password -
123123