Download the PHP package ufo-engineering/laravel-wallet without Composer
On this page you can find all versions of the php package ufo-engineering/laravel-wallet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ufo-engineering/laravel-wallet
More information about ufo-engineering/laravel-wallet
Files in ufo-engineering/laravel-wallet
Package laravel-wallet
Short Description Easy to use virtual wallet for your app
License MIT
Homepage https://github.com/UfoEngineering/laravel-wallet
Informations about the package laravel-wallet
Fork from Laravel Wallet
Changes:
- modify migration. PrimaryKey(int) -> (uuid)
- Added db transaction
- added UfoEngineering\Wallet\Exception\FailedWalletTransactionException
- UfoEngineering\Wallet\HasWallet withdraw() and deposit() return boolean
Laravel Wallet
In a few projects I had to implement a virtual currency. The user would buy packs of credits with Stripe and then use them in the app in exchange of services or goods. This package is a small and simple implementation of this concept with place for customization.
Installation
Install the package with composer:
Run Migrations
Publish the migrations with this artisan command:
Configuration
You can publish the config file with this artisan command:
This will merge the wallet.php
config file where you can specify the Users, Wallets & Transactions classes if you have custom ones.
Usage
Add the HasWallet
trait to your User model.
Then you can easily make transactions from your user model.
You can easily add meta information to the transactions to suit your needs.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.