Skip to content
darkterminal edited this page Nov 12, 2026 · 2 revisions

Turso Platform API for Laravel

Laravel integration for darkterminal/turso-api-client-php — exposes the Turso Platform API as a pre-configured shared client: publishable config, auto-discovered Service Provider, and a Facade so calls read naturally in Laravel apps.

CI Version

Latest release: v1.0.0 (2026-11-12). PHP 8.3+ · Laravel 12+.

Installation

composer require darkterminal/turso-platform-laravel

The Service Provider and Facade are auto-discovered. No manual registration needed.

Configuration

TURSO_PLATFORM_API_TOKEN=your-platform-api-jwt
TURSO_PLATFORM_ORGANIZATION=your-org-slug       # optional
TURSO_PLATFORM_ORGANIZATION_ID=your-org-uuid    # required for v3 recovery operations
TURSO_PLATFORM_BASE_URL=https://api.turso.tech  # optional override

Publish the config if you need to customize:

php artisan vendor:publish --provider="Darkterminal\TursoPlatformLaravel\TursoPlatformServiceProvider" --tag=turso-platform-config

Quick start

Via Facade

use Darkterminal\TursoPlatformLaravel\TursoPlatform;

$databases = TursoPlatform::databases()->list();
$token     = TursoPlatform::databases()->createToken('main', 'never',
    \Darkterminal\TursoPlatformAPI\Enums\Authorization::FULL_ACCESS);

Via container injection

use Darkterminal\TursoPlatformAPI\Client\Client;

public function index(Client $client)
{
    $databases = $client->databases()->list();
    // ...
}

Via manager

use Darkterminal\TursoPlatformLaravel\TursoPlatformManager;

$client    = app(TursoPlatformManager::class)->client();
$databases = $client->databases()->list();

Uploading a SQLite dump? See the SDK's docker/upload-proof/ harness — uploads and closest region resolution are separate from this package and ship with darkterminal/turso-api-client-php.

Pages

  • Facade-Map — all 12 resources / 53 operations, env→builder mapping, contract quirks
  • Architecture — namespace tree, container pipeline, lazy resolution, quality gates
  • Troubleshooting — missing-token ConfigurationException, publish tag, v3 recovery UUID, config cache

Source of truth

Maintainership notes: this wiki is generated from the repo docs (docs/); if something drifts, the repo docs win — report it via issues.

Clone this wiki locally