guzzlehttp/guzzle-services
Guzzle Services adds a command layer on top of Guzzle using service descriptions to define operations, serialize requests, and parse responses into convenient model structures. Build typed clients from descriptions, call operations as methods, and get structured results.
php artisan api:call stripe.charges.create).php artisan api:test stripe)./users with no nested payloads). Use Laravel’s built-in HTTP client instead.webonyx/graphql-php or overblog/graphql-bundle).reactphp/react or spatie/webhook-server.spatie/webhook-client or laravel-webhooks.zircote/swagger-php for OpenAPI-first workflows.For Executives: *"This package cuts API integration time by 40% by auto-generating PHP clients from service descriptions. For example:
For Engineering: *"Guzzle Services turns API docs into type-hinted PHP classes with zero manual mapping. Here’s why it’s a game-changer for Laravel projects:
json_encode()/json_decode() for every API call. The package handles serialization/validation automatically.// Define a service description (once)
$description = new Description([
'baseUri' => 'https://api.stripe.com',
'operations' => [
'create_charge' => [
'httpMethod' => 'POST',
'uri' => '/v1/charges',
'parameters' => ['amount', 'currency', 'source'],
'responseModel' => 'Charge'
]
]
]);
// Inject into Laravel container
$this->app->bind(GuzzleClient::class, function ($app) use ($description) {
return new GuzzleClient(new Client(), $description);
});
// Use anywhere in your app
$charge = $this->guzzleClient->create_charge(['amount' => 1000, 'currency' => 'usd']);
amount types).foo[]=bar query params).php artisan api:call stripe.charges.list for non-devs.
Trade-offs:For Product Managers: *"This tool reduces API-related risks by:
php artisan api:test stripe.subscriptions.create).How can I help you explore Laravel packages today?