PHP code example of laraveleg / laravel-user-wallet

1. Go to this page and download the library: Download laraveleg/laravel-user-wallet library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

laraveleg / laravel-user-wallet example snippets


use LaravelEG\UserWallet\Traits\UserWalletTrait;

class User extends Authenticatable
{
    use UserWalletTrait;
    ...

Auth::user()->depositBalance(100, '<details>');

Auth::user()->withdrawalBalance(50, '<details>');

Auth::user()->balance;
bash
$ php artisan migrate