1. Go to this page and download the library: Download kaffe-software/l1 library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kaffe-software / l1 example snippets
use RenokiCo\L1\D1\D1Pdo;
use RenokiCo\L1\D1\D1PdoStatement;
use RenokiCo\L1\CloudflareD1Connector;
$pdo = new D1Pdo(
dsn: 'sqlite::memory:', // irrelevant
connector: new CloudflareD1Connector(
database: 'your_database_id',
token: 'your_api_token',
accountId: 'your_cf_account_id',
),
);