PHPackages                             fannypack/ledger - 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. fannypack/ledger

ActiveLibrary

fannypack/ledger
================

ledger implementation for laravel

1.21(6y ago)3028612[2 issues](https://github.com/mpaannddreew/laravel-ledger/issues)MITPHP

Since Sep 12Pushed 6y ago9 watchersCompare

[ Source](https://github.com/mpaannddreew/laravel-ledger)[ Packagist](https://packagist.org/packages/fannypack/ledger)[ RSS](/packages/fannypack-ledger/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (5)Versions (6)Used By (0)

About this library
------------------

[](#about-this-library)

This is a simple/basic implementation of a ledger in laravel 5

Actions supported
-----------------

[](#actions-supported)

- RECORDING DEBITS
- RECORDING CREDITS
- BALANCE COMPUTATION

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

[](#installation)

git clone

Register service provider

```
FannyPack\Ledger\LedgerServiceProvider::class,
```

Register Facade Register service provider

```
'Ledger' => FannyPack\Ledger\Facades\Ledger::class,
```

After the service provider is registered run this command

```
php artisan vendor:publish --tag=ledger

```

Run migrations

```
php artisan migrate

```

This command will copy the library's vue components into your codebase

Register package routes in your app's RouteServiceProvider

```
Ledger::routes();

```

Usage
-----

[](#usage)

Using it with your models, add

```
namespace App;

use FannyPack\Ledger\Traits\Ledgerable;
use Illuminate\Database\Eloquent\Model;

class Account extends Model
{
    use Ledgerable;
}
```

Show available balance

```
$account = Account::find(1);
$balance = Ledger::balance($account);
```

or

```
$account = Account::find(1);
$balance = $account->balance();
```

Record a credit entry

```
$account = Account::find(1);
Ledger::credit($account, $to, $amount, $reason);
```

or

```
$account = Account::find(1);
$account->credit($to, $amount, $reason);
```

Record a debit entry

```
$account = Account::find(1);
Ledger::debit($account, $from, $amount, $reason);
```

or

```
$account = Account::find(1);
$account->debit($from, $amount, $reason);
```

Recording debits and credits in one transaction

```
$account = Account::find(1);
$account2 = Account::find(2);
$account3 = Account::find(3);
Ledger::transfer($account, [$account2, $account3], $amount, $reason);
// or
Ledger::transfer($account, $account2, $amount, $reason);
Ledger::transfer($account, $account3, $amount, $reason);
```

or

```
$account = Account::find(1);
$account2 = Account::find(2);
$account3 = Account::find(3);
$account->transfer([$account2, $account3], $amount, $reason);
// or
$account->transfer($account2, $amount, $reason);
$account->transfer($account3, $amount, $reason);
```

Retrieving all entries of a ledgerable

```
$account = Account::find(1);
$entries = $account->entries();
```

Retrieving all debits of a ledgerable

```
$account = Account::find(1);
debits = $account->debits();
```

Retrieving all credits of a ledgerable

```
$account = Account::find(1);
debits = $account->credits();
```

Using the provided Ledger.vue component in your blade templates

```

```

Bugs
----

[](#bugs)

For any bugs found, please email me at  or register an issue at [issues](https://github.com/mpaannddreew/laravel-ledger/issues)

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 92% 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 ~241 days

Total

4

Last Release

2443d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d5bafcd30a688aba8094028f87235beac385ed6552e4fca43b310271b69c32e?d=identicon)[mpaannddreew](/maintainers/mpaannddreew)

---

Top Contributors

[![mpaannddreew](https://avatars.githubusercontent.com/u/10240351?v=4)](https://github.com/mpaannddreew "mpaannddreew (23 commits)")[![adriangoris](https://avatars.githubusercontent.com/u/1189967?v=4)](https://github.com/adriangoris "adriangoris (1 commits)")[![Kristories](https://avatars.githubusercontent.com/u/774338?v=4)](https://github.com/Kristories "Kristories (1 commits)")

---

Tags

phplaravellibraryledger

### Embed Badge

![Health badge](/badges/fannypack-ledger/health.svg)

```
[![Health](https://phpackages.com/badges/fannypack-ledger/health.svg)](https://phpackages.com/packages/fannypack-ledger)
```

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/pulse

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

1.7k12.1M99](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

6392.1k](/packages/masterro-laravel-mail-viewer)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)

PHPackages © 2026

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