File: /home/aliazzsr/api.crm.vqode.com/README.md
# Yii API
### Requirements
- php >=5.4.0
- apache2/nginx
- git
### Installation
1. Go to the project root directory.
1. Install Composer locally (https://getcomposer.org/download/).
1. Install assets plugin:
```
php composer.phar global require "fxp/composer-asset-plugin:^1.3.1"
```
1. Install required packages
```
php composer.phar -n install
```
1. Apply required configuration:
```
php init --env=<environment> --overwrite=y
```
where `<environment>` either Staging, Production or Development.
1. Configure database settings config/db.php` if necessary.
1. Apply database migrations:
```
php yii migrate/up
```
1. Configure web server according to [Yii documentation](http://www.yiiframework.com/doc-2.0/guide-start-installation.html#recommended-apache-configuration).
### Directory structure
config/ application configurations
controllers/ web-controller classes
environments/ list of configuration settings available
migrations/ database migration files
models/ model classes
ops-tools/ operational script files, deploying tools
runtime/ files generated during runtime (logs, filecache)
vendor/ dependent 3rd-party packages
web/ the entry script and web resources