1. Go to this page and download the library: Download ghanem/bee 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/ */
ghanem / bee example snippets
use Ghanem\Bee\Facades\Bee;
// Get all categories
$categories = Bee::getCategoryList();
// Get category service list
$categoryServices = Bee::getCategoryServiceList();
// Get provider list by category
$providers = Bee::getProviderList(categoryId: 2);
// Get all services
$services = Bee::getServiceList();
// Get service input/output parameters
$inputParams = Bee::getServiceInputParameterList();
$outputParams = Bee::getServiceOutputParameterList();
// Clear all cached data
Bee::clearCache();
// Clear specific cache key
Bee::clearCache('category_list_en');
use Ghanem\Bee\Events\BeeWebhookReceived;
use Ghanem\Bee\Events\TransactionStatusUpdated;
// Listen to all webhook events
Event::listen(BeeWebhookReceived::class, function ($event) {
// $event->event - event name (e.g. 'transaction.completed')
// $event->payload - full webhook payload
});
// Listen specifically to transaction status changes
Event::listen(TransactionStatusUpdated::class, function ($event) {
// $event->transactionId
// $event->status
// $event->payload
});