zyna/l1
最新稳定版本:v1.0.1
Composer 安装命令:
composer require zyna/l1
包简介
This is a forked package from Ntanduy and renoki-co, I plan to maintain this to future laravel version. a Star ⭐⭐⭐⭐ would be enough as a motivation and encouragement for me to continue maintaining this package
README 文档
README
This is a forked package from renoki-co and Ntanduy, I plan to maintain this to future laravel versions.
a star ⭐⭐⭐⭐ on GitHub would be enough as a motivation and encouragement for me to continue maintaining this package.
Integrate Cloudflare bindings into your PHP/Laravel application.
This package offers support for:
🚀 Installation
composer require zyna/l1
👏 Usage
Integrate Cloudflare D1 with Laravel
Add a new connection in your config/database.php file:
'connections' => [ 'd1' => [ 'driver' => 'd1', 'prefix' => '', 'database' => env('CLOUDFLARE_D1_DATABASE_ID', ''), 'api' => 'https://api.cloudflare.com/client/v4', 'auth' => [ 'token' => env('CLOUDFLARE_TOKEN', ''), 'account_id' => env('CLOUDFLARE_ACCOUNT_ID', ''), ], ], ]
Next, configure your Cloudflare credentials in the .env file:
CLOUDFLARE_TOKEN=
CLOUDFLARE_ACCOUNT_ID=
CLOUDFLARE_D1_DATABASE_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
The d1 driver will forward PDO queries to the Cloudflare D1 API to execute them.
🌱 Testing
Start the built-in Worker to simulate the Cloudflare API:
cd tests/worker
npm ci
npm run start
In a separate terminal, run the tests:
vendor/bin/phpunit
🤝 Contributing
Please see CONTRIBUTING for details.
🔒 Security
If you discover any security related issues, please Make Issue Request on Github.
🎉 Credits
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2025-03-21