1. Go to this page and download the library: Download marjose123/pitaka 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/ */
return [
/**
* --------------------------------------------------------------
* Wallet Migration
* --------------------------------------------------------------
* This will be used for the Wallet Table.
*/
'wallet_table' => [
'default_decimal_places' => 2,
],
/**
* -------------------------------------------------------------------
* Default User Wallet
* -------------------------------------------------------------------
*/
'user' => [
'wallet' => null, // Add your default wallet name here. This will be used if you don't provide a wallet name when calling `$user->wallet()`
],
];
$user->wallet('peso-wallet')->check(500) // will return true/false depending on how much amount left in the wallet