Search by

greenmind / accounting

gtcomnet-backend-103

A simple double-entry accounting package for Laravel.

1.0.0 2026-05-12 15:31 UTC

This package is auto-updated.

Last update: 2026-09-13 09:09:44 UTC


README

A simple, robust double-entry accounting package for Laravel.

Installation

You can install the package via composer:

composer require greenmind/accounting

You can publish and run the migrations with:

php artisan vendor:publish --tag="accounting-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="accounting-config"

Usage

Creating Accounts

use Greenmind\Accounting\Models\Account;

$cash = Account::create(['name' => 'Cash', 'currency' => 'USD']);
$revenue = Account::create(['name' => 'Sales Revenue', 'currency' => 'USD']);

Posting Journal Entries

You can use the Ledger facade to create balanced journal entries:

use Greenmind\Accounting\Facades\Ledger;

$entry = Ledger::entry('Payment for Order #123')
    ->currency('USD')
    ->debit($cash->id, 100.00)
    ->credit($revenue->id, 100.00)
    ->post();

The post() method will automatically validate that the entry is balanced (debits = credits) and that all accounts exist.

Testing

composer test

License

The MIT License (MIT). Please see License File for more information.

accounting