PHPackages                             rockbuzz/lara-orders - 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. rockbuzz/lara-orders

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

rockbuzz/lara-orders
====================

Abstraction for order implementation

0.9.2(4y ago)057MITPHPPHP &gt;=7.4

Since Jul 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/rockbuzz/lara-orders)[ Packagist](https://packagist.org/packages/rockbuzz/lara-orders)[ RSS](/packages/rockbuzz-lara-orders/feed)WikiDiscussions main Synced 6d ago

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

Lara Orders
===========

[](#lara-orders)

Order management

[![](https://github.com/rockbuzz/lara-orders/workflows/Main/badge.svg)](https://github.com/rockbuzz/lara-orders/workflows/Main/badge.svg)

Requirements
------------

[](#requirements)

PHP &gt;=7.4

Install
-------

[](#install)

```
$ composer require rockbuzz/lara-orders
```

```
$ php artisan vendor:publish --provider="Rockbuzz\LaraOrders\ServiceProvider" --tag="migrations"
```

```
$ php artisan migrate
```

Add the `HasOrder` trait to the template for which you will be ordering

Usage
-----

[](#usage)

```
use Rockbuzz\LaraOrders\Transaction;
use Rockbuzz\LaraOrders\Models\Order;
use Rockbuzz\LaraOrders\Models\OrderCoupon;
use Rockbuzz\LaraOrders\Traits\HasOrder;

class YourBuyer
{
    use HasOrder
}
```

```
$buyer->orders(): MorphMany;

$buyer->createOrder(array $notes = []): Order;

$buyer->orderById(int $id): ?Order;

$buyer->orderByUuid(string $uuid): ?Order;
```

```
$order->buyer(): BelongsTo;

$order->coupon(): BelongsTo;

$order->applyCoupon(OrderCoupon $coupon);

$order->items(): HasMany;

$order->total; //98.99

$order->totalInCents; //9899

$order->totalWithCoupon; //88.99

$order->totalWithCouponInCents; //8899

$order->transactions(): HasMany;
```

- Events

```
Rockbuzz\LaraOrders\Events\OrderCreated::class
Rockbuzz\LaraOrders\Events\OrderTransactionCreated::class
Rockbuzz\LaraOrders\Events\CouponApplied::class
```

License
-------

[](#license)

The Lara Orders is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~1 days

Total

19

Last Release

1748d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a5c02aa268a45e5f1d9c67c331503d326eb4b49eb0fb80293dc7379ccef51f7?d=identicon)[rockbuzz](/maintainers/rockbuzz)

---

Top Contributors

[![rockbuzz-dev](https://avatars.githubusercontent.com/u/48301419?v=4)](https://github.com/rockbuzz-dev "rockbuzz-dev (27 commits)")[![paulohpsrock](https://avatars.githubusercontent.com/u/59696754?v=4)](https://github.com/paulohpsrock "paulohpsrock (8 commits)")[![tiagodevweb](https://avatars.githubusercontent.com/u/15040375?v=4)](https://github.com/tiagodevweb "tiagodevweb (1 commits)")

---

Tags

orders

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/rockbuzz-lara-orders/health.svg)

```
[![Health](https://phpackages.com/badges/rockbuzz-lara-orders/health.svg)](https://phpackages.com/packages/rockbuzz-lara-orders)
```

PHPackages © 2026

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