pantera-digital/yii2-user-balance

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
There is no license information available for the latest version (dev-master) of this package.

dev-master 2019-08-30 10:30 UTC

This package is auto-updated.

Last update: 2021-06-29 01:38:25 UTC


README

User balance module for Yii2 apps

Install

Run

php composer require pantera-digital/yii2-user-balance "*"

Or add to composer.json

"pantera-digital/yii2-user-balance": "*",

and execute:

php composer update

Migrations:

php yii migrate --migrationPath=vendor/pantera-digital/yii2-user-balance/migrations

Usage

Add below lines to 'components' section:

'userBalance' => [
    'class' => \pantera\user\balance\Component::class,
    'userModel' => 'path-to-your-user-module\models\User',
],

And add this to 'modules' section:

'user-balance' => [
    'class' => \pantera\user\balance\Module::class,
    'access' => ['admin'], // by default 'access' => ['@']
]