A simple laravel package for wallet implementation.
This package can basically be plugged into a laravel project and it will handle wallet transactions. It allows for a user to have multiple wallets that can be given different names.
Install via composer
$ composer install nobelatunje/wallet
Copy the database migrations to your migrations folder and run
$ php artisan migrate
$wallet = Wallet::create($user_id, "Car Savings Wallet");
$wallet = $this->hasMany(Wallet::class, 'user_id');
$wallet->credit(2000, "Payment for order #849494");
$wallet->debit(1000, "Purchase of airtime");
$wallet = Wallet::find(2);
$transaction = Transaction::find(3);
$wallet->reverseTransaction($transaction);
Wallet::find(2)->transactions();
Wallet::all();
Wallet::find(2)->delete();