Turso Platform API · Laravel integration

Manage Turso Platform from Laravel.

A thin, auto-discovered Laravel integration for the Turso Platform PHP SDK. Publish config, inject the client, or call the facade — and manage databases, groups, tokens, members, audit logs, and recovery from your Laravel app.

  • Laravel 12+
  • Auto-discovered provider
  • Facade + DI
  • Built on turso-api-client-php
routes/web.php
use Darkterminal\TursoPlatformLaravel\TursoPlatform;

Route::get('/databases', function () {
    $dbs = TursoPlatform::databases()->list();
    $token = TursoPlatform::databases()
        ->createToken('main');

    return response()->json($dbs);
});
12Facade resource accessors
53SDK operations mapped
v1.xLatest release
—GitHub stars

Why this package

Laravel wiring, SDK power.

This package keeps HTTP and contract logic in turso-api-client-php, while giving Laravel apps the familiar config, container, and facade ergonomics.

Auto-discovered

Service provider and facade are registered through Laravel package discovery. Install, set env vars, and start calling TursoPlatform::....

Safe config boundaries

Token is read from TURSO_PLATFORM_API_TOKEN at resolution time. The package fails fast with clear configuration exceptions when required config is missing.

Facade or DI

Use TursoPlatform facade, inject Client, or resolve TursoPlatformManager. All resolve the same shared SDK client.

Coverage

Every SDK resource, Laravel-ready.

The facade maps 1:1 to the SDK client resources. Method signatures and contract behavior come from the underlying `turso-api-client-php` package.

Databases

Create, configure, token-mint, rotate, inspect usage/stats. databases().

Groups

Manage groups, locations, config, transfer, unarchive, tokens. groups().

Organizations

Read/update org settings, plans, invoices, subscription, usage. organizations().

Members & Invites

Manage users and invites with typed roles. members(), invites().

API Tokens

Personal and org-scoped Platform API token lifecycle. apiTokens().

Audit Logs

Paginated organization audit logs for operational traceability. auditLogs().

Recovery

List/restore deleted databases and groups via v3 UUID endpoints. recovery().

Auth & Locations

Validate tokens, inspect current user, list locations. auth(), user().

Install

Install, configure, call.

Add the package, set Platform API credentials, and use the facade or container binding in your Laravel app.

  1. 1

    Install package

    Require darkterminal/turso-platform-laravel in a Laravel 12+ app.

  2. 2

    Set environment

    Set TURSO_PLATFORM_API_TOKEN and optional org slug/UUID. Publish config if needed.

  3. 3

    Use facade or DI

    Call TursoPlatform::databases()->list() or inject Client. See the user manual.

shell
$ composer require darkterminal/turso-platform-laravel

# .env
$ TURSO_PLATFORM_API_TOKEN=...
$ TURSO_PLATFORM_ORGANIZATION=acme

# optional
$ php artisan vendor:publish --tag=turso-platform-config

Need the full Laravel guide?

The user manual covers configuration, facade/container usage, every resource area, SDK integrations, error handling, troubleshooting, and architecture notes.