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

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

silali/laravel-wallet
=====================

Easy to use virtual wallet for your app

v1.0.9(6y ago)0740MITPHPPHP ^7.0

Since Feb 22Pushed 4y agoCompare

[ Source](https://github.com/gissilali/laravel-wallet)[ Packagist](https://packagist.org/packages/silali/laravel-wallet)[ Docs](https://github.com/depsimon/laravel-wallet)[ RSS](/packages/silali-laravel-wallet/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (11)Used By (0)

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

[](#laravel-wallet)

In a few projects I had to implement a virtual currency. The user would buy packs of credits with Stripe and then use them in the app in exchange of services or goods. This package is a small and simple implementation of this concept with place for customization.

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

[](#installation)

Install the package with composer:

```
composer require depsimon/laravel-wallet
```

Run Migrations
--------------

[](#run-migrations)

Publish the migrations with this artisan command:

```
php artisan vendor:publish --provider="Depsimon\Wallet\WalletServiceProvider" --tag=migrations
```

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

[](#configuration)

You can publish the config file with this artisan command:

```
php artisan vendor:publish --provider="Depsimon\Wallet\WalletServiceProvider" --tag=config
```

This will merge the `wallet.php` config file where you can specify the Users, Wallets &amp; Transactions classes if you have custom ones.

Usage
-----

[](#usage)

Add the `HasWallet` trait to your User model.

```
use Depsimon\Wallet\HasWallet;

class User extends Model
{
    use HasWallet;

    ...
}
```

At some point before making transactions, create the user's wallet.

```
$user->wallet()->create();
```

Then you can easily make transactions from your user model.

```
$user = User::find(1);
$user->balance; // 0

$user->deposit(100);
$user->balance; // 100

$user->withdraw(50);
$user->balance; // 50

$user->forceWithdraw(200);
$user->balance; // -150
```

You can easily add meta information to the transactions to suit your needs.

```
$user = User::find(1);
$user->deposit(100, 'deposit', ['stripe_source' => 'ch_BEV2Iih1yzbf4G3HNsfOQ07h', 'description' => 'Deposit of 100 credits from Stripe Payment']);
$user->withdraw(10, 'withdraw', ['description' => 'Purchase of Item #1234']);
```

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Simon Depelchin](https://github.com/depsimon)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 54.5% 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 ~84 days

Recently: every ~187 days

Total

10

Last Release

2242d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f4baf0ec06e062cbcced7e83d784a46400afe025d3d8b1ef615b0db1f33b70d?d=identicon)[silali](/maintainers/silali)

---

Top Contributors

[![depsimon](https://avatars.githubusercontent.com/u/1822289?v=4)](https://github.com/depsimon "depsimon (12 commits)")[![gissilali](https://avatars.githubusercontent.com/u/13868653?v=4)](https://github.com/gissilali "gissilali (5 commits)")[![chadtomkiss](https://avatars.githubusercontent.com/u/1034152?v=4)](https://github.com/chadtomkiss "chadtomkiss (1 commits)")[![Davidnadejdin](https://avatars.githubusercontent.com/u/40993387?v=4)](https://github.com/Davidnadejdin "Davidnadejdin (1 commits)")[![abdelaziz321](https://avatars.githubusercontent.com/u/21992961?v=4)](https://github.com/abdelaziz321 "abdelaziz321 (1 commits)")[![kneazi2013](https://avatars.githubusercontent.com/u/16222991?v=4)](https://github.com/kneazi2013 "kneazi2013 (1 commits)")[![tobeycodes](https://avatars.githubusercontent.com/u/3613405?v=4)](https://github.com/tobeycodes "tobeycodes (1 commits)")

---

Tags

currencywalletvirtualcreditslaravel-walletdepsimon

### Embed Badge

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

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

###  Alternatives

[bavix/laravel-wallet

It's easy to work with a virtual wallet.

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

Easy to use virtual wallet for your app

9521.6k1](/packages/depsimon-laravel-wallet)[mannikj/laravel-wallet

Easy to use virtual wallet for your app

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

Modern Laravel Countries package providing ISO 3166-2, ISO 3166-3, currency, capital and more for all countries. Compatible with Laravel 11.x and 12.x.

8272.8M8](/packages/webpatser-laravel-countries)[bavix/laravel-wallet-swap

Addition to the package laravel-wallet.

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

PHPackages © 2026

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