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

ActiveLibrary

gbxnga/laravel-ledger
=====================

General Ledger and Journal Accounting Package for Laravel with JSON API

v2.1.2(2mo ago)0292↓100%MITPHPPHP ^8.2CI passing

Since Feb 28Pushed 2mo agoCompare

[ Source](https://github.com/gbxnga/laravel-ledger)[ Packagist](https://packagist.org/packages/gbxnga/laravel-ledger)[ RSS](/packages/gbxnga-laravel-ledger/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Ledger
==============

[](#laravel-ledger)

[![Tests](https://github.com/gbxnga/laravel-ledger/actions/workflows/tests.yml/badge.svg)](https://github.com/gbxnga/laravel-ledger/actions/workflows/tests.yml)[![Latest Version on Packagist](https://camo.githubusercontent.com/6031e3394ef27e16230bed2048030c0bb6dfb2a84c979147ed88985bda8b8865/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6762786e67612f6c61726176656c2d6c65646765722e737667)](https://packagist.org/packages/gbxnga/laravel-ledger)[![PHP Version](https://camo.githubusercontent.com/f92a97614a162a872c553bcb1561c61cca828a86136ef3a0749ea558ae0305cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6762786e67612f6c61726176656c2d6c65646765722e737667)](https://packagist.org/packages/gbxnga/laravel-ledger)[![License](https://camo.githubusercontent.com/b702f410d80a82e90fcb98042e935ae8fa9f99f2d08e5d905980c39ede1652ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6762786e67612f6c61726176656c2d6c65646765722e737667)](https://packagist.org/packages/gbxnga/laravel-ledger)

General Ledger and Journal Accounting Package for Laravel with JSON API.

A maintained fork of [abivia/ledger](https://github.com/abivia/ledger), upgraded to support modern PHP and Laravel versions.

Features
--------

[](#features)

- Full double-entry accounting system with audit trail capability.
- Multi-currency support.
- Support for multiple business units.
- Sub-journal support.
- Multilingual.
- Integrates via direct controller access or through JSON API.
- Atomic transactions with concurrent update blocking.
- Reference system supports soft linking to other ERP components.
- Bulk journal detail inserts and aggregated balance updates for high-volume posting.
- Automatic batch coalescing — consecutive `entry/add` and `entry/delete` operations in a batch are merged into bulk passes.
- Configurable chunk sizes and optional performance metrics logging.

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

[](#requirements)

- PHP 8.2+
- Laravel 11 or 12

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

[](#installation)

```
composer require gbxnga/laravel-ledger
```

Publish configuration:

```
php artisan vendor:publish --provider="Abivia\Ledger\LedgerServiceProvider"
```

Create database tables:

```
php artisan migrate
```

Migrating from abivia/ledger
----------------------------

[](#migrating-from-abivialedger)

If you're currently using `abivia/ledger`, you can switch to this package with minimal effort. All PHP namespaces (`Abivia\Ledger\*`) remain unchanged, so your application code works as-is.

1. Swap the package:

```
composer remove abivia/ledger
composer require gbxnga/laravel-ledger
```

2. Update your PHP and Laravel versions if needed:
    - PHP 8.2+ (previously 8.0+)
    - Laravel 11 or 12 (previously Laravel 8+)

Your published config (`config/ledger.php`), migrations, and database tables are not affected by the package swap. No changes are needed to your service provider references, config files, migrations, or any code that uses `Abivia\Ledger` classes.

Configuration
-------------

[](#configuration)

The configuration file is installed as `config/ledger.php`. You can enable/disable the JSON API, set middleware, and a path prefix to the API.

### Performance Tuning

[](#performance-tuning)

Journal detail inserts and balance updates are performed in bulk using chunked queries. When a batch contains consecutive `entry/add` or `entry/delete` operations, they are automatically coalesced into grouped passes — reducing database round-trips from O(n) per detail line to O(1) chunked operations.

All settings live under `ledger.performance` in `config/ledger.php` and can be overridden via environment variables:

Environment VariableDefaultDescription`LEDGER_ENTRY_DETAIL_CHUNK``1000`Max rows per `journal_details` bulk insert`LEDGER_ENTRY_BALANCE_CHUNK``500`Max rows per `ledger_balances` select/upsert pass`LEDGER_ROOT_DETAIL_CHUNK``1000`Max rows per opening-balance detail insert`LEDGER_ROOT_BALANCE_CHUNK``500`Max rows per opening-balance upsert`LEDGER_BATCH_COALESCE_ENTRY_ADD``true`Merge consecutive `entry/add` batch operations into one bulk write`LEDGER_BATCH_COALESCE_ENTRY_DELETE``true`Merge consecutive `entry/delete` batch operations into one bulk delete/reversal pass`LEDGER_BATCH_COALESCE_MIN_GROUP``2`Minimum consecutive add/delete operations required before coalescing activates`LEDGER_PERFORMANCE_METRICS``false`Emit structured performance logs (detail rows, chunks, elapsed time)Updating
--------

[](#updating)

To ensure schema changes are in place, publish the configuration again and migrate:

```
php artisan vendor:publish --provider="Abivia\Ledger\LedgerServiceProvider"
php artisan migrate
```

Testing
-------

[](#testing)

```
composer test
```

With coverage:

```
composer test-coverage
```

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

[](#documentation)

Full documentation is available at [ledger.abivia.com](https://ledger.abivia.com/).

Credits
-------

[](#credits)

- [Alan Langford](https://github.com/abivia) - Original author
- [Gbenga Oni](https://github.com/gbxnga) - Maintainer of this fork

License
-------

[](#license)

MIT. See [LICENSE](LICENSE.md) for details.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance86

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.4% 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 ~0 days

Total

4

Last Release

73d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bee7ba2bee793829cacdf0cc67b7e1609c17cca316287e75b35bd6c0979af073?d=identicon)[gbxnga](/maintainers/gbxnga)

---

Top Contributors

[![instancezero](https://avatars.githubusercontent.com/u/2599327?v=4)](https://github.com/instancezero "instancezero (189 commits)")[![gbxnga](https://avatars.githubusercontent.com/u/30432941?v=4)](https://github.com/gbxnga "gbxnga (6 commits)")[![abivia](https://avatars.githubusercontent.com/u/94868022?v=4)](https://github.com/abivia "abivia (5 commits)")[![shaband](https://avatars.githubusercontent.com/u/28789948?v=4)](https://github.com/shaband "shaband (3 commits)")[![Alexgoogole](https://avatars.githubusercontent.com/u/19230051?v=4)](https://github.com/Alexgoogole "Alexgoogole (2 commits)")[![ivanmazep](https://avatars.githubusercontent.com/u/104190182?v=4)](https://github.com/ivanmazep "ivanmazep (2 commits)")[![lewrq](https://avatars.githubusercontent.com/u/16439443?v=4)](https://github.com/lewrq "lewrq (2 commits)")

---

Tags

laravelAccountingjournalledgerabivia

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[abivia/ledger

General Ledger and Journal Accounting Package for Laravel with JSON API

12934.9k](/packages/abivia-ledger)[altek/accountant

The auditing &amp; accountability package for Laravel's Eloquent ORM.

92954.3k4](/packages/altek-accountant)[ekmungai/eloquent-ifrs

Eloquent Double Entry Accounting with focus on IFRS Compliant Reporting

35757.9k](/packages/ekmungai-eloquent-ifrs)[climactic/laravel-credits

A ledger-based Laravel package for managing credit-based systems in your application.

29925.4k](/packages/climactic-laravel-credits)[langleyfoxall/xero-laravel

💸 Access the Xero accounting system using an Eloquent-like syntax

86235.1k](/packages/langleyfoxall-xero-laravel)[akaunting/module-offline-payments

Offline Payments app for Akaunting

11230.0k](/packages/akaunting-module-offline-payments)

PHPackages © 2026

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