greenmind / accounting
A simple double-entry accounting package for Laravel.
1.0.0
2026-05-12 15:31 UTC
Requires
- php: ^8.2
- illuminate/database: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
Requires (Dev)
- orchestra/testbench: ^9.0|^10.0|^11.0
- pestphp/pest: ^2.0|^3.0
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.