windomz/coupon-module

A coupon module component - modularity and easy to deploy.

v0.10.1 2017-07-05 12:52 UTC

This package is not auto-updated.

Last update: 2024-10-27 03:36:54 UTC


README

A coupon module component - modularity and easy to deploy.

Latest Stable Version Build Status Minimum PHP Version Minimum MYSQL Version Platform

中文文档

Feature

  • CouponActivity
  • CouponTemplate
  • CouponPack = CouponActivity + CouponTemplate
  • CouponBatch
  • Coupon = CouponPack + CouponBatch

Install

Open the terminal in the project directory:

$ composer require windomz/coupon-module

Create a configuration file, like config.yml:

database_host: 127.0.0.1
database_port: 3306
database_type: mysql
database_name: coupondb
database_username: root
database_password: root
database_logging: true # open debug log

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

Of course, you can also customize the database name based on ./sql/coupondb.sql, but note that the table name CANNOT MODIFY!

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

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

Usage

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

License

MIT