Create a cash wallet for the user that can deposit and withdraw.
Add orm to composer.json configuration file.
$ composer require laraveleg/laravel-user-wallet
$ php artisan migrate
app/Models/User.php fileuse LaravelEG\UserWallet\Traits\UserWalletTrait;
class User extends Authenticatable
{
use UserWalletTrait;
...
To deposit into a user’s wallet.
Auth::user()->depositBalance(100, '<details>');
For withdrawal from the user’s wallet.
Auth::user()->withdrawalBalance(50, '<details>');
Fetch user balance.
Auth::user()->balance;
php artisan vendor:publishLaravelEG\UserWallet\UserWalletServiceProviderGo to config/laraveleg/userwallet.php
depositing and withdrawalTHX.