Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Float Sdk

Laravel Float Sdk Laravel Package

spatie/laravel-float-sdk

A Laravel-friendly SDK for the Float.com API v3, with config publishing, API token and user-agent setup, and a FloatClient for interacting with the API. Not a full Float API implementation, but extensible via PRs.

View on GitHub
Deep Wiki
Context7

A Laravel SDK for the Float.com API

Frequently asked questions about Laravel Float Sdk
How do I install spatie/laravel-float-sdk in a Laravel application?
Install it with Composer using composer require spatie/laravel-float-sdk, then add FLOAT_API_TOKEN and FLOAT_USER_AGENT to your .env file. Optionally publish the config with php artisan vendor:publish --tag="float-sdk-config" if you want to override the defaults in code. After that the client is resolved from the service container, so you can inject FloatClient into a constructor or resolve it with app(FloatClient::class). No migrations, service providers or other bootstrapping steps are required.
Which Laravel and PHP versions does laravel-float-sdk support?
The package is a standard Laravel package that binds FloatClient into the service container, and version 2.1.0 added Laravel 13 support, so it tracks current Laravel releases. Because the supported PHP and illuminate/* constraints can change between releases, check the requirements on Packagist or in the package's composer.json before you upgrade an existing application. The API token env variables and published config file are unchanged across those versions.
Which Float API endpoints and resources can I query with this SDK?
The client exposes seven read-oriented resource groups: users, projects, projectTasks, clients, allocations, timeOff and publicHolidays. Each one offers a get($id) call for a single record and an all($params) call for a listing. The README is explicit that this is not a complete implementation of Float API v3, so treat the documented resource groups as the supported surface and verify anything else against Float's own v3 reference before relying on it.
Can I create or update allocations, projects or time entries with spatie/laravel-float-sdk?
No. Every documented method is a fetch operation (get and all), so there is no documented support for creating or updating allocations, projects, people or time entries. If your roadmap needs to push data into Float, such as timesheet submission or allocation write-back, you will need to open an upstream PR or fork the package, or hand-roll the calls with Saloon or Guzzle. The package also exposes no webhooks, no event ingestion and no expense endpoints, so claims about webhook-driven updates or expense automation are not supported by the current surface.
How does pagination work in laravel-float-sdk?
The all() methods accept page and perPage parameters through the typed params objects, with a default page size of 50, and return a single page of results. There is no documented auto-paginating iterator or lazy collection, so any full-sync job has to own its own paging loop, page-size choice and termination logic. For large Float accounts, plan for throttling and idempotent upserts on your side rather than expecting the SDK to stream everything for you.
How do I sort, filter or limit the fields returned by the Float API?
Use the typed query-parameter value objects shipped with the package, such as GetUsersParams or GetAllocationsParams, and pass them into the matching all() call. Those objects cover page, perPage, sort, fields and expand, which lets you request only the attributes you need and pull in related records via expand. Building the params objects instead of raw arrays keeps your calls readable and gives you IDE completion on the supported options.
How do I configure the Float API token and user agent?
Set FLOAT_API_TOKEN and FLOAT_USER_AGENT in your .env file, or publish the config file with php artisan vendor:publish --tag="float-sdk-config" and change the api_token and user_agent values there. Float expects a descriptive user agent, so use something like YourAppName ([email protected]). The configuration is application-wide, which is fine for a single Float account but matters if you need per-tenant credentials.
Can I use multiple Float API tokens for multi-tenant applications?
Not out of the box. The package reads a single API token from config, so one token applies to the whole application instance. If you need per-customer Float accounts, you will have to override the config at runtime or rebind FloatClient in the container per tenant, and that pattern is not documented in the README. Treat multi-account support as work you own and cover it with tests before shipping.
How do I fake or mock FloatClient in my test suite?
Because FloatClient is bound into Laravel's service container, you can swap it for a mock or a fake implementation in your tests and assert on the calls your application makes. Underneath, the client uses Saloon for HTTP, so you can also intercept at the transport layer with Saloon's own testing helpers and mock responses when you want to test the real client against fixture payloads. That combination lets you test your integration logic without hitting the live Float API.
Is spatie/laravel-float-sdk production ready and actively maintained?
It is a young package with limited real-world traction: roughly 4 GitHub stars and no dependents, with a single primary author under the Spatie umbrella and releases that are largely dependency bumps. The 1.0.1 fix for the single allocation object response shows response mapping is still being corrected in the field, and the pre-1.0 changelog included breaking renames, so minor-version churn is plausible despite post-1.0 semantic versioning. Spatie's stewardship is a genuine mitigant, but budget time to wrap the client behind your own interface, pin versions and add integration tests so an upstream change or a missing endpoint does not ripple through your codebase.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk