Yii2 Easy Start
This is Yii2 start application template., (*1)
It was created and developing as a fast start for building an advanced sites based on Yii2., (*2)
It covers typical use cases for a new project and will help you not to waste your time doing the same work in every project, (*3)
#
Сборка для простого старта разработки приложений, основанных на коде с yii2., (*4)
В сборке уже настроены основные компоненты и она поможет вам не тратить время, делая ту же работу в каждом проекте., (*5)
#
DEMO
Frontend:
http://yii2-easy-start.ceprey.xyz, (*6)
Backend:
http://admin.yii2-easy-start.ceprey.xyz, (*7)
administrator
role account, (*8)
Login: admin
Password: admin
manager
role account, (*9)
Login: manager
Password: manager
user
role account, (*10)
Login: user
Password: user123
REQUIREMENTS
The minimum requirement by this application template that your Web server supports PHP 5.4.0.
Required PHP extensions:
- intl, (*11)
Installation
Before you begin
-
If you do not have Composer, you may install it by following the instructions at getcomposer.org., (*12)
-
Install composer-asset-plugin needed for yii assets management, (*13)
composer global require "fxp/composer-asset-plugin"
Get source code
Download sources
https://github.com/martyn911/yii2-easy-start/archive/master.zip, (*14)
Or clone repository manually
git clone https://github.com/martyn911/yii2-easy-start.git
Install composer dependencies
composer install
Get source code via Composer
You can install this application template with composer
using the following command:, (*15)
composer create-project --prefer-dist --stability=dev martyn911/yii2-easy-start
Setup application
- Copy
.env.dist
to .env
in the project root.
-
Adjust settings in .env
file, (*16)
- Set debug mode and your current environment
YII_DEBUG = true
YII_ENV = dev
DB_DSN = mysql:host=127.0.0.1;port=3306;dbname=yii2-easy-start
DB_USERNAME = user
DB_PASSWORD = password
- Set application canonical urls
frontendUrl = http://yii2-easy-start.dev
backendUrl = http://admin.yii2-easy-start.dev
#from
ROBOT_EMAIL = robot@yii2-easy-start.dev
#amin mail
ADMIN_EMAIL = admin@yii2-easy-start.dev
-
Run in command line, (*17)
php console/yii app/setup
Copy vhost.conf.dist
to vhost.conf
, change it with your local settings and copy (symlink) it to nginx sites-enabled
directory.
Or configure your web server with three different web roots:, (*18)
- yii2-easy-start.dev => /path/to/yii2-easy-start.dev/frontend/web
- admin.yii2-easy-start.dev => /path/to/yii2-easy-start.dev/backend/web
That`s all. After provision application will be accessible on http://yii2-easy-start.dev
Demo data
Demo Users
Login: admin
Password: admin
Login: manager
Password: manager
Login: user
Password: user123
Have any questions?
mail to martyn911@i.ua, (*19)
NOTE
This template was created mostly for developers NOT for end users.
This is a point where you can begin your application, rather than creating it from scratch.
Good luck!, (*20)