Turso + Doctrine DBAL
Set up Turso in your PHP + Doctrine DBAL project in minutes
Prerequisites
Before you start, make sure you:
- Install the Turso CLI
- Sign up or login to Turso
- Have an PHP Application with Doctrine DBAL
Download the latest build extension/driver binary you can see at Release page. It's available for:
- Linux
- Mac/Darwin
- Windows (WSL) / Devcontainer
Now, LibSQL
class is available in your PHP environment! You can use it everywhere in your PHP project 🎉
Configure database credentials
Get the database URL:
Get the database authentication token:
Assign credentials to the environment variables inside .env
.
Create PHP Project
Create new directory:
Install Turso Doctrine DBAL
Configure database connection
Setup the environment variable in your Laravel application, choose what the type connection you need.
Other environment variables (Embedded Replica Only)
Project Structure Example
Here you simple php todo cli + Doctrine BDAL
Your PHP Application Ready!
Examples
Was this page helpful?