windomz/coupon-plugin

v0.7.3 2017-06-14 03:22 UTC

README

coupon-plugin

Developing...

Latest Stable Version Minimum PHP Version Minimum MYSQL Version Build Status

Feature

  • Activity
  • CouponTemplate
  • Pack = Activity + CouponTemplate
  • Coupon = one of Pack

Installation

Open the terminal in the project directory:

$ composer require windomz/coupon-plugin

Create a configuration file, like config.yml:

database:
    host: 127.0.0.1
    port: 3306
    type: mysql
    name: testdb
    username: root
    password: root

If only for quick testing, you can run ./sql/testdb.sql in MySQL to quickly create a test database.

Of course, you can also customize the database name based on ./sql/testdb.sql, but note that the table name can not be MODIFIED!

In the project initialization, load the specified configuration file through the following implementation:

Coupon::setConfigPath('./config.yml');

Usage

Refer to the Document(Currently only Chinese) for details.

License

The MIT License