Skip to content

Installation

Imam Ali Mustofa edited this page Nov 10, 2026 · 1 revision

Installation

Requirements

  • PHP 8.2, 8.3, 8.4 or 8.5
  • Laravel 12 or 13 (13 requires PHP 8.3+)
  • A libSQL PHP extension installation method via this package's bundled installer (darkterminal/turso-php-installer 2.2+)

Step 1 — Install the package

composer require tursodatabase/turso-driver-laravel

Step 2 — Register the service provider

Laravel 11+ uses bootstrap/providers.php:

return [
    App\Providers\AppServiceProvider::class,
    Turso\Driver\Laravel\LibSQLDriverServiceProvider::class,
];

Step 3 — Install the libSQL PHP extension

php artisan turso-php:install

This downloads the correct .so/.dll for your OS, PHP version and SAPI. The installer also provides lifecycle commands:

Command Purpose
turso-php:install Install the extension
turso-php:update Update the installed extension
turso-php:uninstall Remove the installed extension

Run php artisan | grep turso-php for the full list.

Step 4 — Choose a connection type

See Connection Types.

Verified

  • Package install: composer resolution tested across PHP 8.2–8.5 × Laravel 12/13 in CI.
  • Extension install via turso-php:install: exercised in CI and in the docker/proof/ harness (real install inside a fresh php:8.3-fpm container).

Clone this wiki locally