PHP code example of roboticsexpert / balance-manager

1. Go to this page and download the library: Download roboticsexpert/balance-manager 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/ */

    

roboticsexpert / balance-manager example snippets


composer 

Roboticsexpert\BalanceManager\BalanceManagerServiceProvider::class

return [

    // add symbols of your currencies
    // symbols must be lower than 16 char

    'currencies'=>[
        'BTC',
        'TMN',
        'DOGE',
    ]
];

use Roboticsexpert\BalanceManager\BalanceManagerFacade as BalanceManager;


BalanceManager::getAllBalancesByUserId(1)

use Roboticsexpert\BalanceManager\Services\BalanceManager;

$balanceManager=app(BalanceManager::class); 

$balanceManager->getAllBalancesByUserId(1);

use Roboticsexpert\BalanceManager\Services\BalanceManager;
class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

    public function index(BalanceManager $balanceManager){
        dd($balanceManager->getAllBalancesByUserId(1));
    }
}


$balances= $balanceManager->getAllBalancesByUserId("USER_ID");
dd($balances);
bash 
php artisan migrate
bash 
php artisan vendor:publish --provider="Roboticsexpert\BalanceManager\BalanceManagerServiceProvider"