PHPackages                             aliraghebi/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. [Payment Processing](/categories/payments)
4. /
5. aliraghebi/laravel-wallet

ActiveLibrary[Payment Processing](/categories/payments)

aliraghebi/laravel-wallet
=========================

Virtual wallet implementation to use in Laravel projects.

v2.0.7(8mo ago)28[5 PRs](https://github.com/aliraghebi/laravel-wallet/pulls)MITPHPPHP ^8.2CI passing

Since Apr 16Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/aliraghebi/laravel-wallet)[ Packagist](https://packagist.org/packages/aliraghebi/laravel-wallet)[ Docs](https://github.com/aliraghebi/laravel-wallet)[ RSS](/packages/aliraghebi-laravel-wallet/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (9)Versions (40)Used By (0)

Minimal Documentation on How to use Laravel Wallet
==================================================

[](#minimal-documentation-on-how-to-use-laravel-wallet)

New Wallet
----------

[](#new-wallet)

You can create an unlimited number of wallets, but the `slug` for each wallet should be unique.

### User Model

[](#user-model)

Add the `HasWallet` trait's to model.

```
use AliRaghebi\Wallet\Traits\HasWallet;
use AliRaghebi\Wallet\Interfaces\Wallet;

class User extends Model
{
    use HasWallet;
}
```

Create a wallet
---------------

[](#create-a-wallet)

Find user:

```
$user = User::first();
```

Create a new wallet.

```
$user->hasWallet('my-wallet'); // bool(false)
$wallet = $user->createWallet([
    'name' => 'New Wallet',
    'slug' => 'my-wallet',
]);

$user->hasWallet('my-wallet'); // bool(true)

$wallet->deposit(100);
$wallet->balance; // 100
$wallet->balanceFloatNum; // 1.00
```

How to get the right wallet?
----------------------------

[](#how-to-get-the-right-wallet)

```
$myWallet = $user->getWallet('my-wallet');
$myWallet->balance; // 100
$myWallet->balanceFloatNum; // 1.00
```

Default Wallet + MultiWallet
----------------------------

[](#default-wallet--multiwallet)

Is it possible to use the default wallet and multi-wallets at the same time? Yes.

```
use AliRaghebi\Wallet\Traits\HasWallet;
use AliRaghebi\Wallet\Traits\HasWallet;
use AliRaghebi\Wallet\Interfaces\Wallet;

class User extends Model
{
    use HasWallet, HasWallet;
}
```

How to get the default wallet?

```
$wallet = $user->wallet;
$wallet->balance; // 10
$wallet->balanceFloatNum; // 0.10
```

It's simple!

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance68

Regular maintenance activity

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 99.2% 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 ~4 days

Recently: every ~13 days

Total

34

Last Release

249d ago

Major Versions

v1.5.0 → v2.0.02025-07-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/d2f8cf4574184949a7ee235810bd7bdb642c74837004257c4bcfe15932ca8ebc?d=identicon)[aliraghebi](/maintainers/aliraghebi)

---

Top Contributors

[![aliraghebi](https://avatars.githubusercontent.com/u/21082113?v=4)](https://github.com/aliraghebi "aliraghebi (122 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

laravelcurrencylaravel-packagewalletvirtualcreditslaravel-walletarsam

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[bavix/laravel-wallet

It's easy to work with a virtual wallet.

1.3k1.1M11](/packages/bavix-laravel-wallet)[bavix/laravel-wallet-swap

Addition to the package laravel-wallet.

2427.2k](/packages/bavix-laravel-wallet-swap)[mannikj/laravel-wallet

Easy to use virtual wallet for your app

4310.6k](/packages/mannikj-laravel-wallet)[depsimon/laravel-wallet

Easy to use virtual wallet for your app

9521.6k1](/packages/depsimon-laravel-wallet)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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