umbalaconmeogia / yii2-api
Helper classes to create RESTful API in yii2.
Installs: 636
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
README
Helper classes to create RESTful API in yii2.
Installation
The preferred way to install this extension is through composer.
Either run
$ composer require umbalaconmeogia/yii2-api "@dev"
or add
"umbalaconmeogia/yii2-api": "@dev"
to the require section of your composer.json file and run composer update
.
Add SubSystemUser
For client system that use SubSystemUser, you should run migration to create sub_system_user table.
Configuring migration path.
'migrate' => [ 'class' => 'yii\console\controllers\MigrateController', 'migrationPath' => [ '@console/migrations', '@vendor/umbalaconmeogia/yii2-api/src/migrations', ], ],
Namespaced Migrations
For yii2 advanced template, add to console/config/main.php
'controllerMap' => [ 'migrate' => [ 'class' => 'yii\console\controllers\MigrateController', 'migrationPath' => null, // disable non-namespaced migrations if app\migrations is listed below 'migrationNamespaces' => [ 'console\migrations', // Common migrations for the whole application 'umbalaconmeogia\yii2api\migrations', // Migrations for the specific extension ], ], ],
For yii2 basic template, add to app/config/web.php
'controllerMap' => [ 'migrate' => [ 'class' => 'yii\console\controllers\MigrateController', 'migrationPath' => null, // disable non-namespaced migrations if app\migrations is listed below 'migrationNamespaces' => [ 'app\migrations', // Common migrations for the whole application 'umbalaconmeogia\yii2api\migrations', // Migrations for the specific extension ], ], ],
License
yii2-api is released under the MIT License. See the bundled LICENSE
for details.