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(7mo ago)04MITPHPPHP &gt;=8.0

Since Sep 27Pushed 7mo 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 1mo ago

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 59% of packages

Maintenance62

Regular maintenance activity

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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

233d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c61f0aa4d799664e611c68b60aa027f2e8659a98a5228342faa85315f6398da3?d=identicon)[sganesh088](/maintainers/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

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[kirschbaum-development/commentions

A package to allow you to create comments, tag users and more

12369.2k](/packages/kirschbaum-development-commentions)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)[glhd/special

1929.4k](/packages/glhd-special)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)

PHPackages © 2026

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