PHPackages                             moirei/laravel-pricing - 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. moirei/laravel-pricing

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

moirei/laravel-pricing
======================

Easily manage complex pricing.

1.3.0(1mo ago)10713[2 issues](https://github.com/moirei/laravel-pricing/issues)MITPHPPHP ^8.2

Since Jul 1Pushed 1mo agoCompare

[ Source](https://github.com/moirei/laravel-pricing)[ Packagist](https://packagist.org/packages/moirei/laravel-pricing)[ Docs](https://moirei.github.io/laravel-pricing)[ RSS](/packages/moirei-laravel-pricing/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (11)Versions (14)Used By (0)

Laravel Pricing
===============

[](#laravel-pricing)

Manage complex pricing for your eloquent models.

To use in frontend or Node.js, checkout [moirei/complex-pricing](https://github.com/moirei/complex-pricing).

Documentation
-------------

[](#documentation)

All documentation is available at [the documentation site](https://moirei.github.io/laravel-pricing).

Example
-------

[](#example)

```
...
$product = Product::find(1);

$product->pricing([
    'model' => 'volume',
    'tiers' => [
      [
        'max' => 5,
        'unit_amount' => 3.6,
      ],
      [
        'max' => 10,
        'unit_amount' => 3.3,
      ],
      [
        'max' => 'infinity', // or `-1`
        'unit_amount' => 3.1,
        'flat_amount' => 1.2,
      ],
    ]
  ],
]);

$price = $product->price; // price for 1 item

$price = $product->price(4); // price = 4 x 3.6 = 14.4
$price = $product->price(7); // price = 7 x 3.3 = 23.1
$price = $product->price(15); // price = (15 x 3.1) + 1.2 = 47.7
```

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

[](#installation)

```
composer require moirei/laravel-pricing
```

Concept
-------

[](#concept)

In large applications, pricing for provided goods or service are often not straight forward. For instance, you might want to charge $10 on an item for every 5 units purchased in AU, while at the same time, for your customers in US, regressively charge $50, $40, $30 for every quantity ranged between 0-30, 31-40, 50-infinity respectively.

This package has the concept of `standard`, `package`, `volume`, and `graduated` pricing intended to cover most (if not all) complex pricing scenarios. It also allows naming for multi-currency and multi-region use cases.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](./CHANGELOG.md).

Credits
-------

[](#credits)

- [Augustus Okoye](https://github.com/augustusnaz)

Tests
-----

[](#tests)

```
composer run test
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance85

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity71

Established project with proven stability

 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

Every ~143 days

Recently: every ~299 days

Total

13

Last Release

54d ago

PHP version history (2 changes)1.0.0PHP ^7.2|^8.0

1.3.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ac6a15a7b2f9055a98e4419e0d2820f72db3567706837ec388baee535d3e3e7?d=identicon)[moirei](/maintainers/moirei)

---

Top Contributors

[![augustusnaz](https://avatars.githubusercontent.com/u/51074349?v=4)](https://github.com/augustusnaz "augustusnaz (14 commits)")

---

Tags

laravelecommercevolumepricingmoireigraduatedvolume pricinggraduated pricing

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/moirei-laravel-pricing/health.svg)

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

###  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)[matt-daneshvar/laravel-survey

Create surveys inside your Laravel app

28770.3k](/packages/matt-daneshvar-laravel-survey)[andychukse/laravel-pricing-plans

A package provide pricing plans for Laravel.

121.8k](/packages/andychukse-laravel-pricing-plans)

PHPackages © 2026

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