Stars: 846
Forks: 36
Pull Requests: 79
Issues: 34
Watchers: 10
Last Updated: 2022-12-16 09:44:29
🤠Build awesome API integrations and SDKs for your Laravel or PHP app.
License: MIT License
Languages: PHP
A Laravel / PHP package that helps you build beautiful API integrations and SDKs.
Saloon offers a fluent, object-oriented wrapper to build your next API integration or PHP SDK. It makes sharing API requests throughout your application a breeze. You don’t have to configure a HTTP client, so you can start sending requests really quickly.
If you need request faking for your tests, Saloon has it out of the box alongside many other useful tools like OAuth2 boilerplate and caching. If you use Laravel, there's also a dedicated Laravel package with artisan console commands to help you build even faster.
<?php
use App\Http\Saloon\Requests\GetForgeServerRequest;
$request = new GetForgeServerRequest(serverId: '123456');
$response = $request->send();
$data = $response->json();
Click here to read the documentation
Building API integrations can be time consuming. After you have found an API client to use, you’re faced with lots of configuration to remember and it’s hard to repeat requests without copying and pasting, and then when you introduce patterns like OAuth2 everything gets complicated. You’ll often find yourself writing the same boilerplate code over and over again.
We’ve standardised the way we talk to APIs with PSR-7 and PSR-18 but we haven’t got a standard structure to build API integrations.
Saloon aims to solve this.
Please see here for more details about contributing.
Please see here for our security policy.