PHPackages                             ricadesign/laravel-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ricadesign/laravel-coupon

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ricadesign/laravel-coupon
=========================

Laravel Coupon

v0.3.0(2y ago)15782[1 PRs](https://github.com/Ricadesign/laravel-coupon/pulls)PHP

Since Oct 6Pushed 1y agoCompare

[ Source](https://github.com/Ricadesign/laravel-coupon)[ Packagist](https://packagist.org/packages/ricadesign/laravel-coupon)[ RSS](/packages/ricadesign-laravel-coupon/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (9)Dependencies (1)Versions (16)Used By (0)

Laravel Coupon
==============

[](#laravel-coupon)

This composer package offers a setup to redeem coupon codes on ecommerce sites. It enables the use of several types of discounts, while offering the possibility of limiting user redemption by different means.

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

[](#installation)

Begin by pulling in the package through Composer.

```
composer require ricadesign/laravel-coupon
```

Next, if using Laravel 5, include the service provider within your `config/app.php` file. From version 5.5 and thanks to [package autodiscovery](https://laravel-news.com/package-auto-discovery) this is no longer necesary.

```
'providers' => [
    Ricadesign\LaravelCoupon\LaravelCouponServiceProvider::class,
];
```

Publishing migrations
---------------------

[](#publishing-migrations)

In order for the package to work, the migrations included need to be published with the following command:

```
php artisan vendor:publish
```

Then you can run them with:

```
php artisan migrate
```

Usage
-----

[](#usage)

Once installed a registered user will be able to send a GET petition to **/coupon?discount={COUPON\_CODE}**. Either a valid coupon or a 404 error response will be returned.

The RicaDesign\\LaravelCoupon\\Coupon model also provides the following methods:

MethodParamsReturnsDescriptionstatic findAndValidatecouponCode, subtotal, itemsCountA valid coupon model or nullgetDiscountsubtotalAmount to be subtracted from subtotal (positive)useuserIdvoidIncrements times\_used field, adds entry to user\_coupon table (if needed)Coupon properties
-----------------

[](#coupon-properties)

PropertyDescriptionvalue\_discountValue to discount in coupon type FixPricecode\_nameCodigo de descuento

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~120 days

Recently: every ~126 days

Total

10

Last Release

965d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/26688392d136adb39794523162938f4f3d1f9c08ba69aef8e79cb8ebfa3e57ae?d=identicon)[Payetus](/maintainers/Payetus)

---

Top Contributors

[![acecilia-rica](https://avatars.githubusercontent.com/u/102290040?v=4)](https://github.com/acecilia-rica "acecilia-rica (19 commits)")[![Payetus](https://avatars.githubusercontent.com/u/3797659?v=4)](https://github.com/Payetus "Payetus (14 commits)")[![jperez8](https://avatars.githubusercontent.com/u/48395571?v=4)](https://github.com/jperez8 "jperez8 (6 commits)")

### Embed Badge

![Health badge](/badges/ricadesign-laravel-coupon/health.svg)

```
[![Health](https://phpackages.com/badges/ricadesign-laravel-coupon/health.svg)](https://phpackages.com/packages/ricadesign-laravel-coupon)
```

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
