Download the PHP package parallel-oss/l1 without Composer
On this page you can find all versions of the php package parallel-oss/l1. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download parallel-oss/l1
More information about parallel-oss/l1
Files in parallel-oss/l1
Package l1
Short Description Laravel integration for Cloudflare Workers services.
License Apache-2.0
Homepage https://github.com/parallel-oss/l1
Informations about the package l1
L1 - Cloudflare bindings for Laravel
Extend your PHP/Laravel application with Cloudflare bindings.
This package offers support for:
- [x] Cloudflare D1
- [ ] Cloudflare KV
- [ ] Cloudflare Queues
π Installation
You can install the package via Composer:
π Usage
D1 with raw PDO
Though D1 is not connectable via SQL protocols, it can be used as a PDO driver via the package connector. This proxies the query and bindings to the D1's /query endpoint in the Cloudflare API.
D1 with Laravel
In your config/database.php file, add a new connection:
Then in your .env file, set up your Cloudflare credentials:
The d1Β driver will proxy the PDO queries to the Cloudflare D1 API to run queries.
D1 compatibility notes
This package keeps D1 usage close to native Laravel/SQLite, while accounting for Cloudflare-specific runtime limits:
- Multi-row
INSERTqueries are automatically chunked to D1's bind-parameter limit. - Statements above D1 limits that cannot be safely rewritten fail fast with explicit errors.
- Transport and API error responses are normalized into stable PDO/Laravel exceptions.
- Retry behavior is conservative by default (safe/read-only and explicitly idempotent-safe paths).
These constraints still require app-level design choices:
- D1 SQL/statement limits (for example statement size, row/blob size, function argument limits).
- Workload shaping for long-running writes/migrations (batching and index strategy).
- Transaction expectations that differ from local SQLite when execution is remote/request-scoped.
See docs/d1-sqlite-compatibility.md for the full behavior matrix.
π Testing
Run all tests (the built-in D1 worker is started automatically):
This starts the Worker that simulates the Cloudflare D1 API, runs PHPUnit, then stops the worker. The first run will install worker dependencies (npm ci in tests/worker) if needed.
π€ Contributing
Please see CONTRIBUTING for details.
π Security
If you discover any security related issues, please open an issue on GitHub.
π Credits
- Alex Renoki β original author
- Parallel β maintainer
- All Contributors
All versions of l1 with dependencies
doctrine/dbal Version ^4.4.1
illuminate/cache Version ^12.0|^13.0
illuminate/database Version ^12.0|^13.0
saloonphp/saloon Version ^4.0