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

AbandonedArchivedLibrary

mahbodhastam/laravel-user-wallet
================================

This package allows you to create wallet for the users

v1.1.1(4y ago)75MITPHPPHP ^8.0

Since Jul 19Pushed 4y ago1 watchersCompare

[ Source](https://github.com/MahbodHastam/laravel-user-wallet)[ Packagist](https://packagist.org/packages/mahbodhastam/laravel-user-wallet)[ Docs](https://github.com/mahbodhastam/laravel-user-wallet)[ GitHub Sponsors](https://github.com/MahbodHastam)[ RSS](/packages/mahbodhastam-laravel-user-wallet/feed)WikiDiscussions main Synced yesterday

READMEChangelog (3)Dependencies (8)Versions (6)Used By (0)

Laravel User Wallet
===================

[](#laravel-user-wallet)

[![Latest Version on Packagist](https://camo.githubusercontent.com/149c0c12828a6a0525cf0ed52aac017d64823270bca73b22a1359dc0d7bbc91d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6168626f6468617374616d2f6c61726176656c2d757365722d77616c6c65743f696e636c7564655f70726572656c6561736573267374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/mahbodhastam/laravel-user-wallet)[![GitHub Tests Action Status](https://camo.githubusercontent.com/c8696d61d1f0c568ecc36525ccea7042ed43fab96435ee92725c68791343e72b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d6168626f6468617374616d2f6c61726176656c2d757365722d77616c6c65742f72756e2d74657374733f6c6162656c3d7465737473267374796c653d666f722d7468652d6261646765)](https://github.com/mahbodhastam/laravel-user-wallet/actions?query=workflow%3ATests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/4a0ba7d6314d0a3a2a0a88e265c35ddc79ec53626cd3b5a27d004e3477478f53/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d6168626f6468617374616d2f6c61726176656c2d757365722d77616c6c65742f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65267374796c653d666f722d7468652d6261646765)](https://github.com/mahbodhastam/laravel-user-wallet/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/7145afba416b3f93c5c0d6b22a3fe5563c6b2afab54c39e4a798de038667c4a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6168626f6468617374616d2f6c61726176656c2d757365722d77616c6c65742e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/mahbodhastam/laravel-user-wallet)

---

With this package you can create wallet for the users.

> Note: Make sure you've already installed php ^8

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

[](#installation)

Install the package via composer:

```
composer require mahbodhastam/laravel-user-wallet
```

Usage
-----

[](#usage)

- #### Create New Wallet

    [](#create-new-wallet)

```
use MahbodHastam\UserWallet\UserWallet;

$wallet = UserWallet::createNewWallet(user_id: 1);

$amount = $wallet->amount;
$token = $wallet->token;
```

- #### Get wallet with the token/id

    [](#get-wallet-with-the-tokenid)

```
$wallet = UserWallet::getWallet('abc');
```

- #### Get wallet's balance

    [](#get-wallets-balance)

```
$balance = UserWallet::balance($wallet)['total'];
```

- #### Change wallet's amount

    [](#change-wallets-amount)

```
UserWallet::fill($wallet, 100);
```

- #### Charge the wallet

    [](#charge-the-wallet)

```
UserWallet::charge($wallet, 500);
```

- #### Send

    [](#send)

```
UserWallet::send(
    sender: $wallet1,
    receiver: $wallet2,
    value: 50
);
```

- #### Open a request

    [](#open-a-request)

```
$transaction = UserWallet::makeRequest(
    value: 300,
    receiver: $wallet
);

// Keep it
$hash = $transaction->transaction_hash;

UserWallet::closeRequest(
    sender: $wallet,
    transaction_hash: $hash
);
```

- #### Get the balance in blade

    [](#get-the-balance-in-blade)

```
@userWalletBalance($wallet)

{{-- $wallet can be wallet's `id`, `token` or an instance from UserWalletModel --}}
```

> See the [Tests](tests) for more examples.

Testing
-------

[](#testing)

```
composer test
```

Todos
-----

[](#todos)

- Blade Directives

Changelog
---------

[](#changelog)

See [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

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

Total

5

Last Release

1731d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1faab9a1094d7fb37c4b31d2f6248ae0ede4adf2a0e9779438bc6a4867f9ddd0?d=identicon)[mahbod4782](/maintainers/mahbod4782)

---

Top Contributors

[![MahbodHastam](https://avatars.githubusercontent.com/u/17749373?v=4)](https://github.com/MahbodHastam "MahbodHastam (18 commits)")

---

Tags

laravelpackagephpphp8userwalletMahbodHastamlaravel-user-wallet

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[illuminate/queue

The Illuminate Queue package.

20331.4M1.2k](/packages/illuminate-queue)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[illuminate/redis

The Illuminate Redis package.

8314.0M314](/packages/illuminate-redis)

PHPackages © 2026

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