Skip to main content
Doctrine DBAL

Prerequisites

Before you start, make sure you: Download the latest build extension/driver binary you can see at Release page. It's available for:
Get the installer:
Add as a global executable script:
UsageInstall Turso Client PHP / libSQL Extension:
Check on your console/terminal
Update Turso Client PHP / libSQL Extension:
Uninstall Turso Client PHP / libSQL Extension:
  • 📦 Extract the archive
  • 🗃 Locate somewhere in your machine
  • 💽 Copy a relative path that address that extension/driver
  • 📂 Open php.ini search ;extension if you using nano (ctrl+w) then searching for it
  • 📝 add in the next-line extension=liblibsql_php.so (in Linux) without ; at the begining
Check on your console/terminal
Now, LibSQL class is available in your PHP environment! You can use it everywhere in your PHP project 🎉
1

Configure database credentials

Get the database URL:
Get the database authentication token:
Assign credentials to the environment variables inside .env.
Save this later when you need to connect to Remote and Embedded Replica
2

Create PHP Project

Create new directory:
3

Install Turso Doctrine DBAL

4

Configure database connection

Setup the environment variable in your Laravel application, choose what the type connection you need.
Other environment variables (Embedded Replica Only)
5

Project Structure Example

Here you simple php todo cli + Doctrine BDAL
6

Your PHP Application Ready!

PHP TODO CLI - TURSO

Examples

PHP Todo CLI + Doctrine DBAL

See the full source code

Symfony Rest API CRUD

See the full source code