juanparati / laravel-kickbox
A Kickbox library for Laravel
Installs: 1 695
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.3
- ext-json: *
- guzzlehttp/guzzle: ^7.2
- illuminate/cache: >=7
- illuminate/support: >=7
Requires (Dev)
- orchestra/testbench: >=5.2
- phpunit/phpunit: >=8.5
This package is auto-updated.
Last update: 2024-11-08 11:17:12 UTC
README
A Laravel interface for the Kickbox service.
Installation
composer require juanparati/laravel-kickbox
Facade registration (optional):
'aliases' => [
...
'Kickbox' => \Juanparati\LaravelKickbox\Facades\KickboxFacade::class,
...
]
Configuration
Publish configuration file:
artisan vendor:publish --provider="Juanparati\LaravelKickbox\Providers\KickboxServiceProvider"
Add the Kickbox api key into your configuration file.
Usage
Verify an e-mail:
$result = Kickbox::service('email')->verify('example@example.org');
Get last balance:
$result = Kickbox::getLastBalance();
Count the number of verifications in the last minute:
Kickbox::getVerificationsInLastMinute();
Verify a list of e-mails using the batch verification:
$list = ['example@example.org', 'example@example.com'];
$job = Kickbox::service('batch')->upload($list, 'https://mycallbackurl.com/foo/bar');
Verify job status
$status = Kickbox::service('batch')->verifyJob($job['id']);
Cache usage
It's possible to define a default cache for the email verification service. This will avoid to perform duplicate verifications of the same e-mail.
See the configuration file for more details.