Abivia Ledger

General Ledger and Journal Accounting Package for Laravel


Ledger lets you track anything related to accounting for money in your application with a single package while making your CFO happy at the same time. No matter if your app is handling memberships for a small club or supporting a multinational enterprise, Ledger can handle it.

Ledger is a full-featured implementation of the core of any good accounting system, a double-entry journal and general ledger. It is not a complete accounting solution, but rather the minimum for keeping track of financial transactions.

Ledger is designed to add reliable accounting features to an application without limiting flexibility. Ledger provides nearly congruent PHP and JSON APIs. There is no user interface.

Ledger 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.
  • Designed for Laravel from the ground up.

Installation and Configuration

Install Ledger with composer:

composer require abivia/ledger

Publish Configurations

php artisan ledger:install

Create database tables

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


The configuration file is installed as config\ledger.php

Setting Default Purpose
api true Enables API routes.
chartPath null Specifies a custom path for Chart of Accounts templates. The default is to use the package path.
reports null When present, this is a list of the API-accessible reports. for a complete description, see Report details.
middleware ['api'] List of middleware for Ledger routes.
prefix 'api/ledger' Route prefix.
session_key_prefix 'ledger.' Namespace for data stored in the session.


Ledger's audit log can be set via LEDGER_LOG_CHANNEL. If a custom log isn't set, LOG_CHANNEL is used.


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

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

Basic Use

  • Create the ledger by passing a Create message to the account controller.
  • Start posting transactions by passing Entry messages to the journal entry controller.
  • Query the ledger by posting EntryQuery messages to the journal entry controller.
  • Get reports by passing Report messages to the report controller.

For a code example, take a look at the Getting Started Test, located at tests/Example/GettingStartedTest.php

Code, Issues, Support

Source code is hosted on GitHub at https://github.com/abivia/ledger.

Issues, questions, and pull requests can be submitted via GitHub at https://github.com/abivia/ledger/issues.

Security issues should be emailed to ledger@abivia.com.

You can also get updates and join the conversation on Mastodon

Contributions and feedback are welcomed.


If you're getting something out of Ledger, you can sponsor us in any amount you wish using Liberapay. Liberapay is itself run on donations and charges no fees beyond bank charges. Liberapay icon