graychen/yii2-jd-deposit

a yii2-extendes for jd-deposit

v0.0.1 2018-04-25 08:51 UTC

This package is not auto-updated.

Last update: 2024-12-22 06:42:29 UTC


README

Latest Stable Version Total Downloads Build Status Scrutinizer Code Quality Code Coverage Build Status StyleCI

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',
]

View

after that,you can website https://localhost/admin/deposit/default

ChangeLog

changelog