PHPackages                             hipster/user-discounts - 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. hipster/user-discounts

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

hipster/user-discounts
======================

A simple Laravel package to manage user-level discounts

v1.0.0(9mo ago)04MITPHPPHP &gt;=8.0

Since Sep 27Pushed 9mo agoCompare

[ Source](https://github.com/sganesh088/user-discounts)[ Packagist](https://packagist.org/packages/hipster/user-discounts)[ RSS](/packages/hipster-user-discounts/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (5)Versions (2)Used By (0)

Laravel User Discounts
----------------------

[](#laravel-user-discounts)

The `hipster/user-discounts` package is a clean, testable, and extensible Laravel package for managing user discounts. It supports assigning, applying, revoking, and auditing discounts with support for **idempotency**, **discount capping**, and **modular services**.

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

[](#installation)

Install via Composer:
---------------------

[](#install-via-composer)

```
composer require hipster/user-discounts

## After Requiring the Package
composer dump-autoload

php artisan vendor:publish --provider="Hipster\UserDiscounts\Providers\DiscountServiceProvider"

###Run Package Migrations via --path
php artisan migrate --path=vendor/hipster/user-discounts/database/migrations
```

Automated Tests
---------------

[](#automated-tests)

### Run Full Test Suite

[](#run-full-test-suite)

```
git clone git@github.com:sganesh088/user-discounts.git
cd user-discounts
composer install
vendor/bin/phpunit
```

### Run Specific Test Files

[](#run-specific-test-files)

```
# Run all unit tests
vendor/bin/phpunit tests/Unit/DiscountServiceCappingTest.php
vendor/bin/phpunit --filter DiscountServiceCappingTest
```

### Run a Single Test Method

[](#run-a-single-test-method)

```
### idempotency_key
vendor/bin/phpunit --filter test_applies_discount_with_same_idempotency_key
vendor/bin/phpunit --filter test_applies_discount_usage_cap

```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance58

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Unknown

Total

1

Last Release

279d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9934246?v=4)[sganesh088](/maintainers/sganesh088)[@sganesh088](https://github.com/sganesh088)

---

Top Contributors

[![sganesh088](https://avatars.githubusercontent.com/u/9934246?v=4)](https://github.com/sganesh088 "sganesh088 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hipster-user-discounts/health.svg)

```
[![Health](https://phpackages.com/badges/hipster-user-discounts/health.svg)](https://phpackages.com/packages/hipster-user-discounts)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[api-platform/laravel

API Platform support for Laravel

58171.4k14](/packages/api-platform-laravel)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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