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

ActiveLibrary[Payment Processing](/categories/payments)

theamostafa/laravel-wallet
==========================

This is my package laravel-wallet

1.0.0(1y ago)1261MITPHPPHP 8.\*

Since Nov 30Pushed 1y ago1 watchersCompare

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

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

Laravel wallet
==============

[](#laravel-wallet)

Light package help you to integrate wallet functionality into your laravel application

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

[](#installation)

You can install the package via composer:

```
composer require theamostafa/laravel-wallet
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="wallet-migrations"
php artisan migrate
```

Usage
-----

[](#usage)

include **HasWallet** trait into your model to apply wallet functions

```
use Theamostafa\Wallet\Traits\HasWallet;

class User extends Model {

  use HasWallet;

}
```

Now we make transactions.

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

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

$user->withdraw(1);
$user->balance; // 9
```

You can also add metadata for transaction

```
$user = User::first();

$transaction = $user->withdraw(
        amount: 1.33,
        meta: [
            'description' => "Refund from order #14"
        ]
    );
    $transaction->description // Refund from order #14

```

Fetch all model transactions.

```
$user = User::first();

$user->transactions()->latest()->paginate();
```

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Ahmed Mostafa](https://github.com/rashwan01)

Features coming with version 2
------------------------------

[](#features-coming-with-version-2)

- Model may be having multiple wallet
- Wallet may be acted as payment gateway and can purchase products

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

529d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a96cad596889400e5819c1ef7841cea8a7f5c35519ba8a9fe5787aa2da7a934?d=identicon)[am.eg](/maintainers/am.eg)

---

Top Contributors

[![Rashwan01](https://avatars.githubusercontent.com/u/36863039?v=4)](https://github.com/Rashwan01 "Rashwan01 (21 commits)")

---

Tags

laravellaravel-walletTheamostafa

### Embed Badge

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

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

###  Alternatives

[danestves/laravel-polar

A package to easily integrate your Laravel application with Polar.sh

7812.3k](/packages/danestves-laravel-polar)[bavix/laravel-wallet-swap

Addition to the package laravel-wallet.

2427.2k](/packages/bavix-laravel-wallet-swap)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[creagia/laravel-redsys

Laravel Redsys Payments Gateway

2013.6k](/packages/creagia-laravel-redsys)

PHPackages © 2026

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