PHPackages                             darkterminal/turso-http-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. darkterminal/turso-http-laravel

ActiveLibrary[Database &amp; ORM](/categories/database)

darkterminal/turso-http-laravel
===============================

A Turso HTTP SDK for Laravel

1.0.1(1y ago)6188[3 PRs](https://github.com/darkterminal/turso-http-laravel/pulls)MITPHPPHP ^8.2CI passing

Since Sep 4Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/darkterminal/turso-http-laravel)[ Packagist](https://packagist.org/packages/darkterminal/turso-http-laravel)[ Docs](https://github.com/tursodatabase/turso-http-laravel)[ Fund](https://saweria.co/darkterminal)[ GitHub Sponsors](https://github.com/darkterminal)[ RSS](/packages/darkterminal-turso-http-laravel/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (11)Versions (7)Used By (0)

 [ ![Turso + Laravel](https://camo.githubusercontent.com/547868baf246cce97198b84e0cc151d9b8bddea622045253200e8353e5ac254d/68747470733a2f2f692e696d6775722e636f6d2f6533506e3652782e706e67)](https://docs.turso.tech/sdk/php/guides/laravel)

### Turso + Laravel

[](#turso--laravel)

 SQLite for Production. Powered by [libSQL](https://turso.tech/libsql).

 [**Turso**](https://turso.tech) · [**Quickstart**](#installation) · [**Examples**](#usage) · [**Docs**](#database-configuration) · [**Discord**](https://discord.com/invite/4B5D7hYwub) · [**Blog &amp; Tutorials**](https://blog.turso.tech/)

---

A LibSQL HTTP for Laravel
=========================

[](#a-libsql-http-for-laravel)

 [    ![Shows a black logo in light color mode and a white one in dark color mode.](https://camo.githubusercontent.com/1231973ca7d74462fee93f4c961bcd721ad05606533ba80fa84994344a26ba78/68747470733a2f2f692e696d6775722e636f6d2f764743433049342e706e67)  ](https://discord.gg/turso)

Requirement
-----------

[](#requirement)

- Turso CLI - [Installation](https://docs.turso.tech/cli/introduction)
- Turso Account - [Register Here](https://tur.so/dt)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require darkterminal/turso-http-laravel
```

Then register the service provider at `bootstrap/providers.php` array:

```
return [
    App\Providers\AppServiceProvider::class,
    Turso\Http\Laravel\LibSQLHttpServiceProvider::class, // Here
];
```

Database Configuration
----------------------

[](#database-configuration)

```
DB_CONNECTION=libsql
DB_DATABASE=
DB_AUTH_TOKEN=
```

Database Configuration
----------------------

[](#database-configuration-1)

Add this configuration at `config/database.php` inside the `connections` array:

```
'libsql' => [
    'driver' => 'libsql',
    'url' => env('DB_DATABASE', ''),
    'authToken' => env('DB_AUTH_TOKEN', ''),
    'database' => null,
    'prefix' => '',
],
```

> Copy and Paste and do not change it! Or try to change it and will broke your app or give you malfunction.

Usage
-----

[](#usage)

For database operation usage, everything have same interface like usual when you using `Illuminate\Support\Facades\DB` in your database model. But remember, this is LibSQL they have `sync` method that can be used when you connect with Remote Replica Connection (Embedded Replica).

```
use Illuminate\Support\Facades\DB;

// Create
DB::table('users')->insert([
    'name' => 'Budi Dalton',
    'email' => 'budi.dalton@duck.com'
]);

// Read
DB::table('users')->get();
DB::table('users')->where('id', 2)->first();
DB::table('users')->orderBy('id', 'DESC')->limit(2)->get();

// Update
DB::table('users')->where('id', 2)->update(['name' => 'Doni Mandala']);

// Delete
DB::table('users')->where('id', 2)->delete();

// Transaction
try {
    DB::beginTransaction();

    $updated = DB::table('users')->where('id', 9)->update(['name' => 'Doni Kumala']);

    if ($updated) {
        echo "It's updated";
        DB::commit();
    } else {
        echo "Not updated";
        DB::rollBack();
    }

    $data = DB::table('users')->orderBy('id', 'DESC')->limit(2)->get();
    dump($data);
} catch (\Exception $e) {
    DB::rollBack();
    echo "An error occurred: " . $e->getMessage();
}
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Imam Ali Mustofa](https://github.com/darkterminal)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance62

Regular maintenance activity

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

669d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/32319439?v=4)[Imam Ali Mustofa](/maintainers/darkterminal)[@darkterminal](https://github.com/darkterminal)

---

Top Contributors

[![darkterminal](https://avatars.githubusercontent.com/u/32319439?v=4)](https://github.com/darkterminal "darkterminal (9 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

---

Tags

databaselaravellibsqlphpsqlitetursolaraveltursolibsqllibsql-driver-laravelturso-driver-laraveltursodatabaseturso-http-laravel

###  Code Quality

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/darkterminal-turso-http-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/darkterminal-turso-http-laravel/health.svg)](https://phpackages.com/packages/darkterminal-turso-http-laravel)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M102](/packages/dedoc-scramble)[wnx/laravel-backup-restore

A package to restore database backups made with spatie/laravel-backup.

213421.4k2](/packages/wnx-laravel-backup-restore)[tursodatabase/turso-driver-laravel

A Turso Driver for Laravel

977.8k](/packages/tursodatabase-turso-driver-laravel)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
