graychen / yii2-jd-deposit
a yii2-extendes for jd-deposit
v0.0.1
2018-04-25 08:51 UTC
Requires
- yiisoft/yii2: 2.0.15.1
Requires (Dev)
- phpunit/phpunit: ^7.1
This package is not auto-updated.
Last update: 2024-12-22 06:42:29 UTC
README
this is a composer-extends for jd game(这是一个和京东游戏充值对接的模块)
Migrate database
To add a lookup table to your database, following is the sql for lookup:
you can use yii migration
yii migrate/up --migrationPath=@graychen/yii2/jd/deposit/migrations
api
Config Module in components part
'jd-deposit' => [
'class' => 'graychen\yii2\jd\deposit\Module',
]
Use Actions
class jdController extends Controller
{
public function actions()
{
return [
'create' => [
'class' => 'graychen\yii2\jd\deposit\createAction'
],
'status' => [
'class' => 'graychen\yii2\jd\deposit\statusAction'
]
];
}
}
backend
Config -> main.php
'controllerMap' => [
'migrate' => [
'class' => 'yii\console\controllers\MigrateController',
'migrationPath' => [
'@graychen/yii2/jd/deposit/migrations'
],
],
],
Config Module in components part
'queue' => [ 'class' => 'graychen\yii2\deposit\backend\Module', ]