PHPackages                             hesamrad/laravel-wallet - 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. hesamrad/laravel-wallet

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

hesamrad/laravel-wallet
=======================

A minimalistic wallet for any Laravel application allowing logging and concurrency.

v1.0.2(yesterday)21↑2900%MITPHPPHP ^8.2

Since Mar 22Pushed yesterdayCompare

[ Source](https://github.com/hesamzakerirad/laravel-wallet)[ Packagist](https://packagist.org/packages/hesamrad/laravel-wallet)[ Docs](https://github.com/hesamzakerirad/laravel-wallet)[ RSS](/packages/hesamrad-laravel-wallet/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (5)Versions (4)Used By (0)

Laravel Wallet
==============

[](#laravel-wallet)

A minimalistic wallet for any Laravel application; it's easy to install and to work with. It also logs every transaction inside storage for future monitoring.

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

[](#installation)

Install via Composer:

```
composer require hesamrad/laravel-wallet
```

The package will automatically register its service provider.

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

[](#configuration)

Publish the necessary files:

```
php artisan vendor:publish --provider="HesamRad\LaravelWallet\LaravelWalletServiceProvider"
```

This will publish the config, migrations and language files used by the wallet.

Usage
-----

[](#usage)

There is not much to do after installing. You only have to add a few lines to your desired model to get started; I presume you have a `User` model that needs a wallet.

1. Have the `User` model implement `\HesamRad\LaravelWallet\Contracts\HasWallet` interface.
2. Use the `\HesamRad\LaravelWallet\Concerns\InteractsWithWallet` trait inside the `User` model.

```
use Illuminate\Foundation\Auth\User as Authenticatable;
use HesamRad\LaravelWallet\Contracts\HasWallet;
use HesamRad\LaravelWallet\Concerns\InteractsWithWallet;

class User extends Authenticatable implements HasWallet
{
    use InteractsWithWallet;

    // The resf of the model...
}
```

This will register neccessary methods and functionalities to work with wallet.

And then run the migtations:

```
php artisan migrate
```

And you're done!

How to deposit money into the wallet?
-------------------------------------

[](#how-to-deposit-money-into-the-wallet)

To deposit money into the wallet, call the `deposit` method on the model:

```
$user->deposit(
    amount: 1.25,
    description: 'This is a test.',
    meta: [
        'key' => 'value'
    ]
);
```

This will deposit 1.25 into the user's wallet and logs the transaction inside `wallet_logs` table. (Note that the `description` and `meta` fields will be stored inside `wallet_logs` table.)

How to withdraw money from the wallet?
--------------------------------------

[](#how-to-withdraw-money-from-the-wallet)

To withdraw money from the wallet, call the `withdraw` method on the model:

```
$user->withdraw(
    amount: 1.00,
    description: 'This is another test.',
    meta: [
        'another-key' => 'another-value'
    ]
);
```

This will withdraw 1.00 from the user's wallet and logs the transaction inside `wallet_logs` table. (Note that the `description` and `meta` fields will be stored inside `wallet_logs` table.)

How to get current balance of the wallet?
-----------------------------------------

[](#how-to-get-current-balance-of-the-wallet)

To get current balance of the wallet, call the `balance` method on the model:

```
$user->balance();
```

How to get wallet logs?
-----------------------

[](#how-to-get-wallet-logs)

To get wallet logs, call `logs` relationship on the wallet:

```
$user->wallet?->logs;
```

Support
-------

[](#support)

If you encounter any issues, have questions or some idea to improve the package, feel free to create an issue or reach out to me:

1. [Create a new issue](https://github.com/hesamzakerirad/laravel-wallet/issues/new)
2. [Email me](mailto:hesamzakerirad@gmail.com)

License
-------

[](#license)

This package is open-source software licensed under the MIT license.

Credits
-------

[](#credits)

- [Hesam Rad](https://github.com/hesamzakerirad)
- [All Contributors](../../contributors)

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance100

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

Every ~91 days

Total

2

Last Release

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47180715?v=4)[Hesam Rad](/maintainers/hesamzakerirad)[@hesamzakerirad](https://github.com/hesamzakerirad)

---

Top Contributors

[![hesamzakerirad](https://avatars.githubusercontent.com/u/47180715?v=4)](https://github.com/hesamzakerirad "hesamzakerirad (8 commits)")

---

Tags

financelaravelwallet

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hesamrad-laravel-wallet/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)[flarum/core

Delightfully simple forum software.

201.4M2.2k](/packages/flarum-core)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)

PHPackages © 2026

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