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

ActiveLibrary

ufo-engineering/laravel-wallet
==============================

Easy to use virtual wallet for your app

v2.0.3(7y ago)124MITPHPPHP ^7.0

Since Feb 22Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ufo-engineering/laravel-wallet)[ Packagist](https://packagist.org/packages/ufo-engineering/laravel-wallet)[ Docs](https://github.com/UfoEngineering/laravel-wallet)[ RSS](/packages/ufo-engineering-laravel-wallet/feed)WikiDiscussions master Synced today

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

Fork from [Laravel Wallet](https://github.com/depsimon/laravel-wallet)
======================================================================

[](#fork-from-laravel-wallet)

### Changes:

[](#changes)

- modify migration. PrimaryKey(int) -&gt; (uuid)
- Added db transaction
- added UfoEngineering\\Wallet\\Exception\\FailedWalletTransactionException
- UfoEngineering\\Wallet\\HasWallet withdraw() and deposit() return boolean

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 ufo-engineering/laravel-wallet
```

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

[](#run-migrations)

Publish the migrations with this artisan command:

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

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

[](#configuration)

You can publish the config file with this artisan command:

```
php artisan vendor:publish --provider="UfoEngineering\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 UfoEngineering\Wallet\HasWallet;

class User extends Model
{
    use HasWallet;

    ...
}
```

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/UfoEngineering)

License
-------

[](#license)

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

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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 ~31 days

Recently: every ~68 days

Total

10

Last Release

2717d ago

Major Versions

v1.0.8 → v2.0.32018-12-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/409582daaefdb4f6ce9f2850546b17ccfa7943ef43bc0fac5b62aa9cad52bba6?d=identicon)[DuckDuck](/maintainers/DuckDuck)

---

Top Contributors

[![depsimon](https://avatars.githubusercontent.com/u/1822289?v=4)](https://github.com/depsimon "depsimon (9 commits)")[![chadtomkiss](https://avatars.githubusercontent.com/u/1034152?v=4)](https://github.com/chadtomkiss "chadtomkiss (1 commits)")

---

Tags

currencywalletvirtualcreditslaravel-walletUfoEngineering

### Embed Badge

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

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