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

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

depsimon/laravel-wallet
=======================

Easy to use virtual wallet for your app

v1.0.9(6y ago)9521.6k56[1 issues](https://github.com/depsimon/laravel-wallet/issues)[1 PRs](https://github.com/depsimon/laravel-wallet/pulls)1MITPHPPHP ^7.0

Since Feb 22Pushed 3y ago9 watchersCompare

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

READMEChangelog (10)Dependencies (1)Versions (11)Used By (1)

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

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 70.6% 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/376c58dc4d5f1208a8424fb24a2e74f65d2ae7bf2679e8601f21fffb11064897?d=identicon)[depsimon](/maintainers/depsimon)

---

Top Contributors

[![depsimon](https://avatars.githubusercontent.com/u/1822289?v=4)](https://github.com/depsimon "depsimon (12 commits)")[![abdelaziz321](https://avatars.githubusercontent.com/u/21992961?v=4)](https://github.com/abdelaziz321 "abdelaziz321 (1 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)")[![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/depsimon-laravel-wallet/health.svg)

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

###  Alternatives

[bavix/laravel-wallet

It's easy to work with a virtual wallet.

1.3k1.1M11](/packages/bavix-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)
