PHPackages                             tasmidur/coupon - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. tasmidur/coupon

ActiveLibrary

tasmidur/coupon
===============

description

v1.0.1(3y ago)015MITPHPPHP ^8.0

Since Jul 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/tasmidur/laravel-coupons)[ Packagist](https://packagist.org/packages/tasmidur/coupon)[ RSS](/packages/tasmidur-coupon/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (2)Used By (0)

Laravel Coupons
===============

[](#laravel-coupons)

This package can associate coupons with your Eloquent models. This might come in handy, if you need to associate voucher codes with content that is stored in your Eloquent models.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require tasmidur/coupon
```

The package will automatically register itself.

You can publish the migration with:

```
php artisan vendor:publish --provider="Tasmidur\Coupon\LaravelCouponServiceProvider" --tag="coupon-migrations"
```

After the migration has been published you can create the coupons table by running the migrations:

```
php artisan migrate
```

You can publish the config-file with:

```
php artisan vendor:publish --provider=Tasmidur\Coupon\LaravelCouponServiceProvider --tag="config"
```

This is the contents of the published config file:

```
