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

ActiveLibrary[Payment Processing](/categories/payments)

amamdouh1939/laravel-wallet
===========================

Easy to use virtual wallet for your app

1.10.2(4y ago)085MITPHPPHP ^7.0

Since Feb 22Pushed 4y agoCompare

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

READMEChangelog (3)DependenciesVersions (15)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

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~122 days

Recently: every ~324 days

Total

13

Last Release

1533d ago

### Community

Maintainers

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

---

Top Contributors

[![depsimon](https://avatars.githubusercontent.com/u/1822289?v=4)](https://github.com/depsimon "depsimon (12 commits)")[![amamdouh1939](https://avatars.githubusercontent.com/u/42440636?v=4)](https://github.com/amamdouh1939 "amamdouh1939 (10 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)")[![Davidnadejdin](https://avatars.githubusercontent.com/u/40993387?v=4)](https://github.com/Davidnadejdin "Davidnadejdin (1 commits)")[![chadtomkiss](https://avatars.githubusercontent.com/u/1034152?v=4)](https://github.com/chadtomkiss "chadtomkiss (1 commits)")

---

Tags

currencywalletvirtualcreditslaravel-walletdepsimon

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/amamdouh1939-laravel-wallet/health.svg)](https://phpackages.com/packages/amamdouh1939-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)[depsimon/laravel-wallet

Easy to use virtual wallet for your app

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

Addition to the package laravel-wallet.

2427.2k](/packages/bavix-laravel-wallet-swap)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[021/laravel-wallet

Reliable and flexible wallet system for Laravel

2785.2k](/packages/021-laravel-wallet)

PHPackages © 2026

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