workersphp / laravel-bridge
Cloudflare-native Laravel drivers for Workers PHP: D1 database, KV and Durable Object caches, R2 storage, Queues, broadcasting and mail.
Requires
- php: ^8.2
- illuminate/database: ^11.0|^12.0|^13.0
- illuminate/mail: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
- league/flysystem: ^3.0
- symfony/http-kernel: ^7.0||^8.0
- symfony/mailer: ^7.0||^8.0
- symfony/mime: ^7.0||^8.0
Requires (Dev)
- orchestra/testbench: ^9.0|^10.0|^11.0
- phpunit/phpunit: ^11.0|^12.0
README
Cloudflare-native Laravel drivers for Workers PHP, the runtime that executes PHP 8.5 inside Cloudflare Workers V8 isolates:
- Database:
cfd1connection over Cloudflare D1 - Cache:
kvstore (Workers KV, read-mostly) anddostore (Durable Object shards with atomic increments and realCache::lock()) - Filesystem:
r2disk (Cloudflare R2) - Queue, mail and broadcasting drivers that ride the runtime's outbox pattern
- A fileinfo polyfill and MIME guesser for the wasm environment
Every driver is opt-in through standard Laravel configuration and inert on a regular server, so one codebase deploys to Workers and to a VPS with nothing but env changes.
composer require workersphp/laravel-bridge
This repository is a read-only mirror of workersphp/core, where the docs, issues and pull requests live. Deploying needs the other half of the project: see the monorepo README for the full quickstart.
Credits
The cfd1 driver registration follows the approach pioneered by
togishima/laravel-edge (MIT),
the first shipped Laravel-on-Workers, and rides the pdo_cfd1 PDO driver by
Sean Morris compiled into the
runtime binary.
Workers PHP is a community project. It is not affiliated with or endorsed by Cloudflare or Laravel.
License
MIT.