PHPackages                             samlorlah/accounts - 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. [Database &amp; ORM](/categories/database)
4. /
5. samlorlah/accounts

ActiveLibrary[Database &amp; ORM](/categories/database)

samlorlah/accounts
==================

A Laravel package for managing financial accounts in banking-related applications

v1.0.0(2mo ago)12MITPHPPHP ^8.1

Since Apr 7Pushed 2mo agoCompare

[ Source](https://github.com/samlorlah/accounts)[ Packagist](https://packagist.org/packages/samlorlah/accounts)[ RSS](/packages/samlorlah-accounts/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

samlorlah/accounts
==================

[](#samlorlahaccounts)

A Laravel package for managing financial accounts in banking-related applications.
Provides double-entry bookkeeping, general ledger management, transaction tracking, account liens/freezes, daily balance snapshots, and an end-of-day (EOD) reconciliation command.

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

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12

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

[](#installation)

**1. Install via Composer:**

```
composer require samlorlah/accounts
```

Laravel's auto-discovery will automatically register the service provider.

**2. Publish the config file:**

```
php artisan vendor:publish --provider="Six3\Accounts\AccountServiceProvider" --tag=config
```

**3. Publish and run the migrations:**

```
php artisan vendor:publish --provider="Six3\Accounts\AccountServiceProvider" --tag=migrations
php artisan migrate
```

**4. (Optional) Publish the seeders:**

```
php artisan vendor:publish --provider="Six3\Accounts\AccountServiceProvider" --tag=seeders
```

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

[](#configuration)

Edit `config/accounts.php` to suit your application.

Usage
-----

[](#usage)

The package binds `AccountingServiceInterface` in the service container. Resolve it via dependency injection or directly from the container.

### Dependency Injection

[](#dependency-injection)

```
use Six3\Accounts\Contracts\AccountingServiceInterface;

class PaymentService
{
    public function __construct(private AccountingServiceInterface $accounts) {}

    public function handle(): void
    {
        // Open a new account
        $account = $this->accounts->openAccount(
            account_type_code: 'SAV',
            customer_id: 1,
            account_name: 'John Doe Savings'
        );

        // Post a double-entry transaction (debit and credit sides must balance)
        $result = $this->accounts->postTransaction([
            'post_status' => 'entered', // or 'approved' to auto-approve
            'narration'   => 'Initial deposit',
            'value_date'  => '2026-04-07',
            'debit' => [
                ['account_no' => '1000000001', 'amount' => '5000.00', 'force_debit' => false],
            ],
            'credit' => [
                ['account_no' => '1000000002', 'amount' => '5000.00'],
            ],
        ]);

        // Approve a pending transaction
        $this->accounts->approveTransaction(tranId: 'OXG_ABC123');

        // Cancel a transaction
        $this->accounts->cancelTransaction(tranId: 'OXG_ABC123', comment: 'Duplicate entry');

        // Get account balance
        $balance = $this->accounts->getAccountBalance(account_no: '1000000001');

        // Validate an account number
        $validation = $this->accounts->validateAccount(account_no: '1000000001');

        // Account enquiry / mini-statement
        $statement = $this->accounts->accountEnquiry(
            account_no: '1000000001',
            start_date: '2026-01-01',
            end_date: '2026-04-07'
        );

        // Transaction journal for a date range
        $journal = $this->accounts->transactionJournal(
            start_date: '2026-01-01',
            end_date: '2026-04-07',
            status: 'approved' // 'all', 'entered', 'approved', 'cancelled'
        );
    }
}
```

### Resolving from the Container

[](#resolving-from-the-container)

```
use Six3\Accounts\Contracts\AccountingServiceInterface;

$accounts = app(AccountingServiceInterface::class);

$balance = $accounts->getAccountBalance('1000000001');
```

### Liens &amp; Freezes

[](#liens--freezes)

```
$accounts = app(AccountingServiceInterface::class);

// Place a lien (hold) on an account
$accounts->addLien(
    account_no: '1000000001',
    amount: 1000.00,
    comment: 'Pending court order',
    expiry_date: '2026-12-31'
);

// List all liens on an account
$accounts->listLien(account_no: '1000000001');

// Remove a lien by its ID
$accounts->removeLien(lien_id: 3);

// Freeze / unfreeze debit or credit on an account
$accounts->updateFreeze(
    account_number: '1000000001',
    debit_freeze: true,
    credit_freeze: false,
    comment: 'Suspicious activity'
);

// Fetch current freeze status
$accounts->fetchFreeze(account_number: '1000000001');
```

### Reports

[](#reports)

```
$accounts = app(AccountingServiceInterface::class);

$accounts->incomeStatement(date: '2026-04-07');
$accounts->balanceSheetByCategory(date: '2026-04-07');
$accounts->trialBalanceReport(date: '2026-04-07');
$accounts->chartOfAccount();
$accounts->checkEodStatus(date: '2026-04-06');
```

Artisan Commands
----------------

[](#artisan-commands)

CommandDescription`php artisan accounts:run-eod`Run end-of-day processing and balance snapshotsModels
------

[](#models)

- `Account` — Core financial account
- `Transaction` — Debit/credit entries
- `GeneralLedger` — GL entries
- `GlSubCategory` — GL sub-categories
- `DailyAccountBalance` — Daily balance snapshots
- `AccountLien` — Lien (hold) records on an account
- `AccountFreeze` — Account freeze records
- `AccountSnapshot` — Full account state snapshots

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance84

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

81d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/48407831?v=4)[Muyiwa Fawole](/maintainers/samlorlah)[@samlorlah](https://github.com/samlorlah)

---

Top Contributors

[![samlorlah](https://avatars.githubusercontent.com/u/48407831?v=4)](https://github.com/samlorlah "samlorlah (5 commits)")

---

Tags

laravelfinanceBankingledgeraccounts

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/samlorlah-accounts/health.svg)

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

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.6k](/packages/larastan-larastan)[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k41.3M600](/packages/spatie-laravel-medialibrary)[laravel/ai

The official AI SDK for Laravel.

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

Monitor the health of a Laravel application

87411.3M153](/packages/spatie-laravel-health)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

438834.4k1](/packages/clickbar-laravel-magellan)[itpathsolutions/dbstan

Database Standardization and Analysis Tool for Laravel

442.1k](/packages/itpathsolutions-dbstan)

PHPackages © 2026

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