3neti/wallet
最新稳定版本:v1.1.0
Composer 安装命令:
composer require 3neti/wallet
包简介
Custom wallet for X-Change
README 文档
README
A lightweight helper package that extends and standardizes usage of Bavix Laravel Wallet within the x-change ecosystem.
🧭 Overview
3neti/wallet is not a wallet implementation.
Instead, it provides:
- Configuration standardization
- System user handling
- Integration glue for x-change services (voucher, cash, settlement)
- Test scaffolding for wallet-based flows
It builds on top of:
bavix/laravel-wallet
🧠 Design Philosophy
This package does NOT own the wallet schema.
All database tables (wallets, transactions, transfers) are owned by:
bavix/laravel-wallet
This package focuses on:
- orchestration
- consistency
- extensibility
📦 Installation
composer require 3neti/wallet
⚙️ Configuration
Publish config files:
php artisan vendor:publish --tag=config
Files
config/wallet.phpconfig/account.php
👤 System User
The package introduces a system user abstraction.
Config
'account' => [ 'system_user' => [ 'identifier' => env('SYSTEM_USER_ID', 'system@example.com'), 'identifier_column' => 'email', 'model' => App\Models\User::class, ], ]
Purpose
- acts as source of funds
- supports top-ups, disbursements, internal transfers
🔄 Integration Role in x-change
Voucher → Cash → Wallet → Settlement
Wallet is responsible for:
- balance tracking
- transfers
- transaction recording
🧪 Testing Strategy
This package:
- does NOT ship migrations
- uses dependency migrations from Bavix
Test Setup
- loads:
- test user migration
- Bavix wallet migrations dynamically
Key Principle
Ownership != Dependency
- Bavix owns schema
- Wallet package depends on it
🏗️ Service Provider
LBHurtado\Wallet\WalletServiceProvider
Responsibilities
- merge configs
- register event provider
- expose configuration
🔌 Dependencies
bavix/laravel-walletspatie/laravel-datalorisleiva/laravel-actionsbrick/money
⚠️ Important Notes
❌ Do NOT:
- copy Bavix migrations into this package
- publish Bavix migrations from here
- override wallet tables
✅ DO:
- treat wallet as infrastructure
- extend behavior via services/actions
- keep this package stateless
🧠 Architectural Role
This package is part of the financial core layer:
[Contact] → [Voucher] → [Cash] → [Wallet] → [Settlement]
Wallet sits at:
👉 value storage + transfer layer
🚀 Future Extensions
- multi-account support
- audit enhancements
- event-driven hooks
- reconciliation support
🧠 Final Thought
This package does not implement wallets.
It ensures wallets behave correctly within x-change.
License
MIT
统计信息
- 总下载量: 69
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-26