greenmind/accounting
Composer 安装命令:
composer require greenmind/accounting
包简介
A simple double-entry accounting package for Laravel.
README 文档
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
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-12