Laravel SDK
The Laravel SDK automatically tracks all HTTP Client calls and provides a tracked Guzzle wrapper.
Installation
composer require outboundiq/laravel-outboundiqConfiguration
Add your API key to .env:
OUTBOUNDIQ_KEY=your_api_key_hereOptionally publish the config file:
php artisan vendor:publish --tag="outboundiq-config"Automatic Tracking
Laravel HTTP Client calls are automatically tracked:
use Illuminate\Support\Facades\Http;
// This is automatically tracked!
$response = Http::get('https://api.stripe.com/v1/charges');
$response = Http::post('https://api.paystack.co/transaction/initialize', [
'amount' => 10000,
'email' => 'customer@example.com',
]);Guzzle Wrapper
For Guzzle HTTP calls, use the tracked wrapper:
use OutboundIQ\Laravel\Http\OutboundIQGuzzleClient;
// Inject or resolve from container
$guzzle = app(OutboundIQGuzzleClient::class);
// All calls are automatically tracked
$response = $guzzle->get('https://api.example.com/data');
$response = $guzzle->post('https://api.twilio.com/messages', [
'json' => ['body' => 'Hello!']
]);Test Your Integration
php artisan outboundiq:testβUser Context
The Laravel SDK automatically captures the authenticated user from Auth::user() and includes it with each tracked request.