PHP SDK
The official HookBridge SDK for PHP provides a simple way to integrate with HookBridge.
Installation
Section titled “Installation”composer require hookbridge/hookbridge-phpQuick Start
Section titled “Quick Start”<?php
require_once 'vendor/autoload.php';
use HookBridge\HookBridge;
$client = new HookBridge('YOUR_API_KEY');
// Create an endpoint$endpoint = $client->createEndpoint( url: 'https://your-app.com/webhooks', description: 'My webhook endpoint');
// Send a webhook$result = $client->send( endpointId: $endpoint->id, payload: [ 'event' => 'user.created', 'data' => [ 'user_id' => '123', 'email' => 'user@example.com', ], ]);
echo "Message sent: " . $result->messageId . "\n";Laravel Integration
Section titled “Laravel Integration”Publish the config file:
php artisan vendor:publish --tag=hookbridge-configThen set your API key in .env:
HOOKBRIDGE_API_KEY=your_api_keyUse the facade:
use HookBridge\Facades\HookBridge;
$result = HookBridge::send( endpointId: 'ep_abc123', payload: ['event' => 'test']);More Information
Section titled “More Information” Personalize Examples
Enter your credentials to populate code examples throughout the docs.