Download the PHP package wfcreations/yii2-app-api without Composer
On this page you can find all versions of the php package wfcreations/yii2-app-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wfcreations/yii2-app-api
More information about wfcreations/yii2-app-api
Files in wfcreations/yii2-app-api
Package yii2-app-api
Short Description Yii 2 Advanced Project Template (with api)
License BSD-3-Clause
Homepage http://www.yiiframework.com/
Informations about the package yii2-app-api
Yii 2 API Project Template
Yii 2 API Project Template is a skeleton Yii 2 application best for developing complex Web applications with multiple tiers.
The template includes four tiers: front end, back end, api, and console, each of which is a separate Yii application.
The template is designed to work in a team development environment. It supports deploying the application in different environments.
DIRECTORY STRUCTURE
INSTALLATION
Install via Composer
If you do not have Composer, you may install it by following the instructions at getcomposer.org.
You can then install this project template using the following command:
composer global require "fxp/composer-asset-plugin:~1.0.0"
composer create-project --prefer-dist --stability=dev wfcreations/yii2-app-api app
Now you should be able to access the application through the following URL, assuming app
is the directory
directly under the Web root.
http://localhost/app/api/web/
http://localhost/app/backend/web/
http://localhost/app/frontend/web/
CONFIGURATION
Database
Edit the file common/config/db.php
with real data, for example:
NOTE: Yii won't create the database for you, this has to be done manually before you can access it.
Enabling JSON Input
To let the API accept input data in JSON format, configure the [[yii\web\Request::$parsers]] property of
the request
application component
to use the [[yii\web\JsonParser]] for JSON input:
Info: The above configuration is optional. Without the above configuration, the API would only recognize
application/x-www-form-urlencoded
andmultipart/form-data
input formats.
All versions of yii2-app-api with dependencies
yiisoft/yii2 Version >=2.0.4
yiisoft/yii2-bootstrap Version ^2.0.10
yiisoft/yii2-swiftmailer Version ^2.1.2