tokenly/credits-cache
App Credits Cache
A library to cache Tokenpass app credits locally. Requires Laravel.
Installation
composer require tokenly/credits-cache- Add
Tokenly\CreditsCache\CreditBalanceCacheProvider::classto your list of service providers
Usage
Fetching a balance
$credits_cache = app(\Tokenly\CreditsCache\CreditBalanceCache::class);
$credit_balance = $credits_cache->getCredits($credits_group_id, $user_account_uuid);
If no local cache balance is present, the cache will call the Tokenpass API and populate it.
Clearing the cache
To clear the local cache, fire a CreditBalanceChanged event. This will force a reload from Tokenpass on the next getCredits call.
use Tokenly\CreditsCache\CreditBalanceChanged;
event(new CreditBalanceChanged($credits_group_id, $user_account_uuid));
Related Packages
erirk/paypalpayment
laravel-paypalpayment is simple package help you process direct credit card paym...
0
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
617,346,630
9,703