PHPackages                             ttbooking/accounting - 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. ttbooking/accounting

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

ttbooking/accounting
====================

Accounting library

v0.0.106(2y ago)340MITPHPPHP ^8.0CI failing

Since Apr 14Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ttbooking/accounting)[ Packagist](https://packagist.org/packages/ttbooking/accounting)[ RSS](/packages/ttbooking-accounting/feed)WikiDiscussions master Synced 3w ago

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

Accounting library
==================

[](#accounting-library)

This Laravel package provides support for robust, transactional money or asset transfers between virtual accounts.

Features
--------

[](#features)

- DBMS based transactions and pessimistic locking
- UUIDs for seamless integration and extension
- Big integer and arbitrary precision math support via MoneyPHP library
- Currency conversion support
- Blockchain for data integrity checking
- Complete control through console commands

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

[](#requirements)

PHP 8.0 and Laravel 9.31 at least.
RDBMS with native JSON field support (recommended).

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

[](#installation)

Using Composer:

```
$ composer require ttbooking/accounting

```

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

[](#configuration)

After installation you'll need to configure package, in which case you have 2 options:

- via environment variables (your application's `.env` file)
- using package's configuration file

If you choose second option, you'll have to copy configuration file into your app's config directory by issuing following command:

```
$ artisan vendor:publish --provider=TTBooking\Accounting\AccountingServiceProvider --tag=config

```

You can look into `accounting.php` config file if you need to know more about each option and its usage.

If you need to alter database table names or modify schema, you'll also need to issue following command:

```
$ artisan vendor:publish --provider=TTBooking\Accounting\AccountingServiceProvider --tag=migrations

```

If you need to publish both config file and database migrations, you can omit "--tag" option:

```
$ artisan vendor:publish --provider=TTBooking\Accounting\AccountingServiceProvider

```

After all database-related modifications are done (if needed), you'll need to execute `artisan migrate` command.

It is recommended to also configure morph map for every possible account owner entity type.
See  for more info.

Usage
-----

[](#usage)

To create account and link it to existing entity, you can use Account facade (or corresponding AccountManager interface):

```
$account = Account::create($user);

```

... will create account for user `$user`.

To find existing account by its owner, try this:

```
$account = Account::find($user);

```

... will find account of `$user` if it exists or fail otherwise.
*Note*: it won't fail if you've enabled account auto-creation. Instead, it will create missing account.

To transfer money between two accounts, you can use Transaction facade (or corresponding TransactionManager interface):

```
$transaction = Transaction::create($account1, $account2, new Money(10000, new Currency('USD')));

```

... will create transaction for transferring $100 from `$account1` to `$account2`.

When you'll need to commit this transaction, just do `$transaction->commit();`.
You can configure autocommit feature if separate transaction create/commit operation is not needed in your project.

To retrieve account or transaction by its UUID, try following:

```
$account = Account::get($uuid);

```

... to get account or

```
$transaction = Transaction::get($uuid);

```

... to get transaction.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 98.5% 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 ~13 days

Recently: every ~248 days

Total

106

Last Release

853d ago

PHP version history (4 changes)v0.0.1PHP ^7.4

v0.0.94PHP ^7.4|^8.0

v0.0.100PHP ^7.4 || ^8.0

v0.0.102PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/40a68a3f1473968f24ec70a09cd3a534f657a48e7d65ce187f8af3481c416ce0?d=identicon)[daniser](/maintainers/daniser)

---

Top Contributors

[![daniser](https://avatars.githubusercontent.com/u/5169543?v=4)](https://github.com/daniser "daniser (65 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

---

Tags

Accountingledger

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ttbooking-accounting/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[illuminate/queue

The Illuminate Queue package.

20432.2M1.5k](/packages/illuminate-queue)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.1k91.3M279](/packages/laravel-horizon)[laravel/ai

The official AI SDK for Laravel.

9782.1M161](/packages/laravel-ai)[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M152](/packages/spatie-laravel-health)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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