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

ActiveLibrary[Payment Processing](/categories/payments)

nishant/wallet
==============

A Laravel package for managing multiple wallets per user with deposit, withdraw, and transaction tracking

v1.1.0(5mo ago)015MITPHPPHP ^8.0

Since Nov 19Pushed 5mo agoCompare

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

READMEChangelogDependencies (4)Versions (5)Used By (0)

Nishant Wallet - Multi-Wallet Management Package for Laravel 11
===============================================================

[](#nishant-wallet---multi-wallet-management-package-for-laravel-11)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6b235038f117fb062689d4775b30797ffe0553bc8aa74aab2673fcac67285bd3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e697368616e742f77616c6c65742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nishant/wallet)[![Total Downloads](https://camo.githubusercontent.com/6cf58057e37953bd6f83c79cffe95885655bea0f842a71ed212c649f1f78bb1a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e697368616e742f77616c6c65742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nishant/wallet)[![License](https://camo.githubusercontent.com/3c823fcf95b3c5c786e44ed184a5bcaa7df8e9b6238de674888e0a58524de835/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e697368616e742f77616c6c65742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nishant/wallet)

A comprehensive Laravel package for managing multiple wallets per user with deposit, withdraw, and transaction tracking capabilities. Built for Laravel 11 and PHP 8.0+.

Features
--------

[](#features)

- ✅ Multiple wallets per user
- ✅ Deposit and withdraw functionality
- ✅ Pending transactions with confirmation support
- ✅ Transaction history tracking
- ✅ Get transactions by wallet name
- ✅ Interface-based architecture
- ✅ Trait-based implementation
- ✅ RESTful API endpoints
- ✅ Soft deletes support
- ✅ Balance validation

Requirements
------------

[](#requirements)

- PHP &gt;= 8.0
- Laravel &gt;= 11.0

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

[](#installation)

### Step 1: Install the Package

[](#step-1-install-the-package)

#### Option A: Install from Packagist (Production)

[](#option-a-install-from-packagist-production)

If the package is published to Packagist, use:

```
composer require nishant/wallet
```

**Note**: If you get a stability error, make sure the package has a stable version tag (v1.0.0) in the Git repository. You can also install a specific version:

```
composer require nishant/wallet:^1.0
```

Or if you need to allow dev stability temporarily:

```
composer require nishant/wallet --dev
```

#### Option B: Local Development Setup

[](#option-b-local-development-setup)

If you're developing the package locally or testing it before publishing, add it to your Laravel project's `composer.json`:

```
{
    "require": {
        "nishant/wallet": "*"
    },
    "repositories": [
        {
            "type": "path",
            "url": "./nishant-wallet-laravel"
        }
    ]
}
```

**Important Notes for Local Development:**

- The package folder (`nishant-wallet-laravel`) should be in the same directory as your Laravel project
- After adding this, run `composer update` to link the package
- Changes in the package will be immediately available (no need to reinstall)
- The package will be symlinked, so you can edit it directly
- For production, remove the `repositories` section and use `composer require nishant/wallet` instead

**Project Structure:**

```
your-laravel-project/
├── composer.json
├── app/
├── ...
└── nishant-wallet-laravel/    ← Package folder (same level)
    ├── composer.json
    ├── src/
    └── ...

```

After adding the repository configuration, run:

```
composer update nishant/wallet
```

### Step 2: Publish Configuration and Migrations

[](#step-2-publish-configuration-and-migrations)

Publish the configuration file:

```
php artisan vendor:publish --tag=wallet-config
```

Publish the migrations:

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

### Step 3: Run Migrations

[](#step-3-run-migrations)

Run the database migrations:

```
php artisan migrate
```

### Step 4: Add Trait to User Model

[](#step-4-add-trait-to-user-model)

Add the `HasWallets` trait to your User model:

```
