PHPackages                             3neti/laravel-vouchers - 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. 3neti/laravel-vouchers

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

3neti/laravel-vouchers
======================

Voucher system for Laravel 10+

v1.1.0(2mo ago)042↓91.8%1MITPHPPHP ^8.2

Since Apr 4Pushed 2mo agoCompare

[ Source](https://github.com/3neti/laravel-vouchers)[ Packagist](https://packagist.org/packages/3neti/laravel-vouchers)[ RSS](/packages/3neti-laravel-vouchers/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (18)Versions (3)Used By (1)

Laravel Vouchers (3neti Fork)
=============================

[](#laravel-vouchers-3neti-fork)

[![License](https://camo.githubusercontent.com/2c5b95b34a9c14598966429711af9b17b05a61368d7f1594a0eabfaa2e71dd6c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f336e6574692f6c61726176656c2d766f7563686572732e7376673f7374796c653d666c61742d737175617265)](LICENSE)

⚠️ Fork Notice
--------------

[](#️-fork-notice)

This package is a **maintained fork** of the original
`frittenkeez/laravel-vouchers`.

### Why this fork exists

[](#why-this-fork-exists)

- ✅ Adds **Laravel 13 compatibility**
- ✅ Aligns with **3neti migration ownership architecture**
- 🔄 Will evolve independently to support:
    - settlement integration
    - idempotency
    - metadata improvements

> This package is now the **source of truth for the vouchers table schema** in the 3neti ecosystem.

---

📦 Installation
--------------

[](#-installation)

```
composer require 3neti/laravel-vouchers
```

---

🚨 Migration Policy (Important)
------------------------------

[](#-migration-policy-important)

Unlike the original package:

### ❌ Original behavior

[](#-original-behavior)

- Requires `vendor:publish` for migrations

### ✅ This fork

[](#-this-fork)

- Uses `loadMigrationsFrom()`
- **No publishing required**
- Migrations are loaded automatically

```
php artisan migrate
```

### 🧠 Ownership Rule

[](#-ownership-rule)

This package **owns**:

- `vouchers` table
- `voucherables` table
- all schema updates related to vouchers

Other packages (e.g., `3neti/voucher`, `3neti/cash`)
**must NOT modify voucher tables directly**

---

🔄 Versioning Strategy
---------------------

[](#-versioning-strategy)

Current: `v1.0.0`

Upcoming releases will follow:

- `v1.x` → compatibility + internal alignment
- `v2.x` → schema ownership + architectural changes

---

⚙️ Configuration
----------------

[](#️-configuration)

```
php artisan vendor:publish --tag=config --provider="FrittenKeeZ\\Vouchers\\VouchersServiceProvider"
```

---

🚀 Usage
-------

[](#-usage)

This package provides the `Vouchers` facade:

```
use FrittenKeeZ\\Vouchers\\Facades\\Vouchers;
```

---

### Generate Codes

[](#generate-codes)

```
$code = Vouchers::generate('***-***-***', '1234567890');

$codes = Vouchers::batch(10);
```

---

### Create Vouchers

[](#create-vouchers)

```
$voucher = Vouchers::create();
$vouchers = Vouchers::create(10);
```

---

### Redeem Vouchers

[](#redeem-vouchers)

```
Vouchers::redeem('123-456-789', $user);
```

Handles exceptions:

- VoucherNotFoundException
- VoucherRedeemedException
- VoucherExpiredException
- VoucherUnstartedException

---

### Unredeem Vouchers

[](#unredeem-vouchers)

```
Vouchers::unredeem('123-456-789', $user);
```

---

🧩 Traits
--------

[](#-traits)

### HasVouchers

[](#hasvouchers)

```
use FrittenKeeZ\\Vouchers\\Concerns\\HasVouchers;

$user->vouchers;
$user->createVoucher();
```

---

### HasRedeemers

[](#hasredeemers)

```
use FrittenKeeZ\\Vouchers\\Concerns\\HasRedeemers;

$user->redeemers;
```

---

🧠 Architectural Notes (3neti)
-----------------------------

[](#-architectural-notes-3neti)

This fork is part of a larger system:

- `voucher` → business logic
- `cash` → financial ledger
- `settlement-envelope` → settlement gating
- `wallet` → balance orchestration

### Role of this package

[](#role-of-this-package)

> **Schema + Core Voucher Engine**

It should remain:

- deterministic
- storage-focused
- side-effect minimal

---

🚫 Anti-Patterns
---------------

[](#-anti-patterns)

Do NOT:

- modify voucher tables outside this package
- duplicate voucher schema in other packages
- treat vouchers as business logic containers

---

🧪 Testing
---------

[](#-testing)

```
composer test
```

---

🙏 Acknowledgement
-----------------

[](#-acknowledgement)

Original package by: **Frederik Sauer**

---

📄 License
---------

[](#-license)

MIT

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance83

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.5% 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

Every ~6 days

Total

2

Last Release

86d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/586e1ed70140038e6348728222adbcf68bfc4455b1f94a4f8bcbe57917a63d57?d=identicon)[3neti](/maintainers/3neti)

---

Top Contributors

[![FrittenKeeZ](https://avatars.githubusercontent.com/u/1186125?v=4)](https://github.com/FrittenKeeZ "FrittenKeeZ (137 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (6 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![patr612e](https://avatars.githubusercontent.com/u/44566563?v=4)](https://github.com/patr612e "patr612e (3 commits)")[![3neti](https://avatars.githubusercontent.com/u/89447696?v=4)](https://github.com/3neti "3neti (2 commits)")

---

Tags

laravelvouchercoupondiscount

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/3neti-laravel-vouchers/health.svg)

```
[![Health](https://phpackages.com/badges/3neti-laravel-vouchers/health.svg)](https://phpackages.com/packages/3neti-laravel-vouchers)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k91.9k1](/packages/mike-bronner-laravel-model-caching)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M203](/packages/laravel-ai)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)

PHPackages © 2026

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