https://github.com/windomz/coupon-plugin
A abstract coupon component
https://github.com/windomz/coupon-plugin
Last synced: about 1 year ago
JSON representation
A abstract coupon component
- Host: GitHub
- URL: https://github.com/windomz/coupon-plugin
- Owner: WindomZ
- License: mit
- Created: 2017-06-02T18:05:29.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-16T03:08:18.000Z (about 9 years ago)
- Last Synced: 2025-02-15T07:42:12.445Z (over 1 year ago)
- Language: PHP
- Homepage: https://github.com/WindomZ/coupon-module
- Size: 112 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## **This project has been suspended, and moved to [coupon-module](https://github.com/WindomZ/coupon-module).**
# coupon-plugin
> Developing...
[](https://packagist.org/packages/windomz/coupon-plugin)
[](https://php.net/)
[](https://www.mysql.com/)
[](https://travis-ci.org/WindomZ/coupon-plugin)
## Feature
- [x] Activity
- [x] CouponTemplate
- [x] Pack = Activity + CouponTemplate
- [x] Coupon = one of Pack
## Installation
Open the terminal in the project directory:
```bash
$ composer require windomz/coupon-plugin
```
Create a configuration file, like `config.yml`:
```yaml
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:
```php
Coupon::setConfigPath('./config.yml');
```
## Usage
Refer to the [Document](https://windomz.github.io/coupon-plugin)(_Currently only Chinese_) for details.
## License
The [MIT License](https://github.com/WindomZ/coupon-plugin/blob/master/LICENSE)