Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Turso 4 min read Announcement mediumAdept

Announcing Laravel Support and PHP PDO Interface

Turso has released `libsql-laravel`, an official open-source Laravel adapter, along with a PHP PDO interface. Both are in technical preview. The adapter extends Laravel's SQLiteConnection, so existing SQLite-compatible code, Eloquent models, migrations and transactions work against local files or remote Turso databases. It replaces community drivers that needed custom PHP extensions but does require FFI to be enabled. A walkthrough builds a movie similarity search using `VectorCast`, the `vector` and `vectorIndex` migration helpers, and a `nearest` query builder method.

Assumes: Laravel Eloquent and migrationsSQLite basics

Related posts

  • Turso Adds Ruby on Rails Support

    Turso mediumAdept

    Turso has released a technical preview of libsql_activerecord, an ActiveRecord adapter that connects Rails applications to Turso/libSQL databases. Setup takes three steps: add the gem, set adapter: libsql with a database url and auth_token in config/database.yml, and optionally set a local path for an embedded replica that syncs the remote database to a local file to remove network latency and allow offline work. The adapter also works outside Rails, in standalone ActiveRecord scripts and Sinatra apps, and supports migrations, CRUD, associations and raw SQL.

  • Getting started with Laravel and Postgres

    Supabase mediumAdept

    A new Laravel app can be connected to a Supabase-hosted Postgres database in a few steps: scaffold the project with Composer, install Laravel Breeze for built-in authentication, set DB_CONNECTION=pgsql and DATABASE_URL to the Supabase pooler connection string, then run migrations and start the dev server. One Supabase-specific tip is to change Laravel's search_path from the public schema to a dedicated schema such as 'laravel', because Supabase exposes public through its data API. Breeze uses Laravel's own auth rather than Supabase Auth, so only database resources are billed.

  • Building a RESTful API with PHP and SQLite

    Turso mediumAdept

    A minimal CRUD REST API in PHP can be built with Dumbo, a small Hono-inspired routing framework, and Turso's experimental HTTP-only PHP SDK for libSQL/SQLite. The walkthrough covers Composer setup, a users table schema, connecting via a DSN with database URL and auth token, and GET/POST/PUT/DELETE routes using parameterized queries, RETURNING clauses and dynamic SET clauses for partial updates. Testing uses PHP's built-in server and cURL. Production use still needs proper validation, authentication, CORS and error handling.

  • Turso v0.6.0

    Turso mediumAdept

    Turso 0.6 is the first release supporting all major SQLite features, adding experimental multi-process WAL access (OFD locks on Linux, fcntl elsewhere, IOCP on Windows) and VACUUM/VACUUM INTO. SQL additions include production-ready triggers, temp tables, virtual generated columns, CREATE TABLE AS SELECT, partial WITHOUT ROWID support, UPDATE...FROM, FILTER on aggregates, NULLS FIRST/LAST, and INDEXED BY hints. The STRICT type system gains arrays, structs/unions and Postgres-style domains, and MVCC logical logs are now encrypted with AEAD in 32 KiB chunks. SDK changes add query timeouts, async prepare, fixed interactive transactions in the serverless driver, an npm-distributed CLI and a SQLAlchemy asyncio dialect.

  • We're building Postgres in Rust. Using the LLVM of databases

    Turso easyNovice

    Turso, a Rust rewrite of SQLite, is adding a Postgres frontend by parsing Postgres SQL into a common AST and compiling it to Turso's VDBE bytecode, turning the engine into an "LLVM of databases" with pluggable frontends. The argument is that SQL databases differ mostly in on-disk layout, not in core operations, so Postgres semantics can be expressed in or added to the VDBE. A C-to-VDBE compiler running Doom illustrates that the bytecode works as a real VM. The work starts from the earlier pgmicro experiment and is early-stage but runnable from source. Planned pieces include the Postgres wire protocol, embedded and in-browser use, live materialized views, and WASM-sandboxed extensions, aiming for broad rather than 100% compatibility.

The quest for software engineering knowledge.

Look:
Layout: