spatie/laravel-float-sdk
Laravel-friendly SDK for the Float.com API (v3). Configure your API token and user agent, then use the FloatClient to access Float resources from your Laravel app. Not a complete API implementation yet—PRs welcome.
FloatClient, FloatServiceProvider), abstracting HTTP clients (Guzzle), authentication (API keys), and rate-limiting. Ideal for teams already using Laravel for backend logic.FloatClient into services. Compatible with Laravel 10+ (check composer.json for exact versions).Float\Events\WebhookReceived) for async processing of Float webhooks, enabling reactive workflows (e.g., triggering internal processes on Float updates).spatie/laravel-package-tools and Guzzle. Monitor for breaking changes in these dependencies or Float’s API v3.FLOAT_API_KEY in .env.FloatServiceProvider).Float:: syntax for concise API calls (e.g., Float::expenses()->create(...)).spatie/float-sdk (if used directly) is PHP 8.1+ compatible but lacks Laravel-specific features. Avoid mixing unless you’re building a standalone PHP service.config/float.php to override default settings (e.g., API base URL, timeout).Float\Events\WebhookReceived.FloatClient to test business logic without hitting Float’s API.Http::fake() to simulate Float API responses.webhook_logs table).composer require spatie/laravel-float-sdk.php artisan vendor:publish --provider="Spatie\Float\FloatServiceProvider"..env with FLOAT_API_KEY.FloatClient into services using Laravel’s DI (e.g., constructor injection).Float::expenses()->all()).POST /float/webhook).Float\Events\WebhookReceived in your event handlers.Spatie\Float\Exceptions\FloatException.composer update spatie/laravel-float-sdk --with-dependencies cautiously in staging.config/float.php for verbose API logs.telescope:install to inspect SDK-related HTTP requests and events.Float::expenses()->all()) with Laravel Cache or Redis.float:process-webhooks).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Float API downtime | Expense syncs fail | Implement retry logic with jitter; notify admins via Laravel Notifications. |
| Webhook delivery failures | Missed updates (e.g., new expenses) | Store webhooks in a queue table; process offline with a cron job. |
| Invalid API key | All SDK calls fail | Validate FLOAT_API_KEY on app boot; use Laravel’s config/caching. |
| SDK version incompatibility | Breaking changes in new releases | Pin version in composer.json; test upgrades in staging. |
| Rate limit exceeded |
How can I help you explore Laravel packages today?