haxneeraj/laravel-virtual-wallet

Laravel Virtual Wallet Package

v1.0.0 2025-04-07 05:44 UTC

This package is auto-updated.

Last update: 2025-04-07 09:35:07 UTC


README

A lightweight, plug-and-play Laravel package for managing virtual wallets, supporting multiple wallet types, transaction logs, and seamless integration with any model like User.

🚀 Features

  • 💼 Multi-Wallet Support — Create and manage multiple wallet types per user.
  • 📜 Transaction Logs — All wallet operations are recorded for full traceability.
  • 🔐 Secure & Reliable — Built using Laravel's Eloquent, enums, morphs & policy-friendly structure.
  • ⚙️ Highly Configurable — Override models, table names, and more via config.
  • 🧩 Easy Integration — Just use a trait on your model and you're ready to go.
  • 💸 Balance Management — Simple credit, debit, transfer, and balance APIs.

📦 Installation

composer require haxneeraj/laravel-virtual-wallet
php artisan vendor:publish --provider="Haxneeraj\LaravelVirtualWallet\LaravelVirtualWalletServiceProvider"
php artisan migrate

🧑‍💻 Setup in Model

use Haxneeraj\LaravelVirtualWallet\Interfaces\WalletInterface;
use Haxneeraj\LaravelVirtualWallet\Traits\HasVirtualWallet;

class User extends Authenticatable implements WalletInterface
{
    use HasVirtualWallet;
}

🔗 Links