windomz / coupon-module
A coupon module component - modularity and easy to deploy.
v0.10.1
2017-07-05 12:52 UTC
Requires
- php: >=7.0
- catfan/medoo: ^1.4
- hassankhan/config: ^0.10.0
- ramsey/uuid: ^3.6
- symfony/yaml: ^3.3
Requires (Dev)
- jakub-onderka/php-parallel-lint: ^0.9.2
- phpunit/phpunit: ^6.2
README
A coupon module component - modularity and easy to deploy.
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.