PHPackages                             cawakharkov/laravel-balance - 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. cawakharkov/laravel-balance

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

cawakharkov/laravel-balance
===========================

Laravel package that provide user balance and transactions functionality for Laravel 5

0.0.1(9y ago)121.0k72MITPHPPHP &gt;=5.6.0

Since Jun 16Pushed 9y ago1 watchersCompare

[ Source](https://github.com/CawaKharkov/laravel-balance)[ Packagist](https://packagist.org/packages/cawakharkov/laravel-balance)[ RSS](/packages/cawakharkov-laravel-balance/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (2)Used By (2)

Laravel package that provides user balance and transactions functionality
-------------------------------------------------------------------------

[](#laravel-package-that-provides-user-balance-and-transactions-functionality)

### *Now working only with Laravel &gt; 5.3, for 5.2 will be created separet branch*

[](#now-working-only-with-laravel--53-for-52-will-be-created-separet-branch)

### User balance = sum of transactions

[](#user-balance--sum-of-transactions)

### Installation

[](#installation)

- `composer require cawakharkov/laravel-balance:dev-master`
- add `\CawaKharkov\LaravelBalance\LaravelBalanceServiceProvider::class` to your config/app.php
- add `\CawaKharkov\LaravelBalance\Providers\TransactionsProvider::class,`(view composer) to your config/app.php
- publish config `php artisan vendor:publish`
- run migrations `php artisan migrate --path=database/migrations/laravel-balance`

### Configuration

[](#configuration)

- **'prefix'** - route prefix for base transactions controller
- **'user'** - User class
- **'layout'** - layout that will be extended in views
- **'list\_view'** - list transaction view
- **'compose'** - array of views where need to inject user transactions

### Usage

[](#usage)

- Add `\CawaKharkov\LaravelBalance\Interfaces\UserHasBalance` interface to your user model
- Add `\CawaKharkov\LaravelBalance\Models\UserBalance` trait to your user model or implement transactions() and balance() methods by your own
- Inject `\CawaKharkov\LaravelBalance\Interfaces\TransactionRepositoryInterface` in controller to have access to transaction repository.

```

    protected $transactions;

      /**
       * TransactionController constructor.
       * @param TransactionRepositoryInterface $repo
       */
      public function __construct(TransactionRepositoryInterface $repo)
      {
          $this->transactions = $repo;
      }

```

- If you want to want to echo user transactions, just add view to composer section of config, and view composer will inject $transaction variable

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

3617d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25991ce361df82734652cfea588bd2ea729733b14dcc7a4699daa94af25e9921?d=identicon)[Cawa87](/maintainers/Cawa87)

---

Tags

balancecomposerlaraveltransactionsuser-balanceuser-transaction

### Embed Badge

![Health badge](/badges/cawakharkov-laravel-balance/health.svg)

```
[![Health](https://phpackages.com/badges/cawakharkov-laravel-balance/health.svg)](https://phpackages.com/packages/cawakharkov-laravel-balance)
```

###  Alternatives

[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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