jeffersongoncalves/laravel-savvycal
Laravel integration for the SavvyCal scheduling API. Provides configuration, service provider wiring, and a clean client for working with scheduling links, events, and availability. Publishable config and facades make it quick to authenticate and call SavvyCal endpoints from any Laravel app.
composer require <vendor>/<package>
php artisan vendor:publish --tag=savvycal-config
.env:
SAVVYCAL_API_KEY=your-token
SAVVYCAL_TIMEOUT=10
The package also falls back to services.savvycal.token, so existing service config can be reused.php artisan config:clear
SavvyCalClient::me() in a Tinker session or a simple health-check route to confirm the token and network path work:
$me = SavvyCalClient::me();
if ($me === null) {
// Token, network, or API failure
}
The first practical use case is usually listing scheduling links and slots so you can render booking options or create a link for a user.
Use the client in a small application service rather than spreading API calls across controllers:
final class SavvyCalSchedulingService
{
public function linksForCurrentUser(): array
{
$links = SavvyCalClient::schedulingLinks()->list();
return is_array($links) ? $links : [];
}
}
Common workflows:
SavvyCalClient::me() during setup or in an admin diagnostics page.Handle the package’s null-safe contract explicitly:
$link = SavvyCalClient::schedulingLinks()->get($linkId);
if ($link === null) {
Log::warning('SavvyCal scheduling link lookup failed', ['link_id' => $linkId]);
abort(404);
}
For mutating calls, treat false as failure and avoid assuming success:
$deleted = SavvyCalClient::webhooks()->delete($webhookId);
if ($deleted === false) {
// Surface a user-facing error or queue a retry
}
Keep API calls behind queued jobs when they are part of user-facing writes. Since failures are returned rather than thrown, jobs should inspect the result and decide whether to retry, log, or fail.
For webhook endpoints, store the remote webhook identifier returned by create so you can later list/delete it. The release notes do not mention signature verification helpers, so plan to verify authenticity at the application layer according to SavvyCal’s webhook documentation.
null or false on network failure or non-2xx responses. Log failures and add metrics; otherwise broken integrations can look like empty data.=== null and === false over if (!$result), because an empty list or valid falsey value may be mistaken for failure depending on the endpoint.SAVVYCAL_API_KEY is missing, the package falls back to services.savvycal.token. Check both locations when debugging authentication.SAVVYCAL_TIMEOUT controls request timeouts. Use a short timeout for request/response paths and a longer timeout for background jobs if needed..env or config/services.php, run php artisan config:clear in local development and deploy with a fresh config cache.How can I help you explore Laravel packages today?