Download the PHP package tursodatabase/turso-driver-laravel without Composer

On this page you can find all versions of the php package tursodatabase/turso-driver-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package turso-driver-laravel

[!CAUTION] There is a new adapter coming soon for Laravel that doesn't require using an extension. This extension doesn't support offline writes beta. Join us on Discord to talk more - https://discord.gg/turso

Shows a black logo in light color mode and a white one in dark color mode.

Turso + Laravel

MIT License Discord Contributors Total downloads Version Tag Testing

SQLite for Production. Powered by libSQL and libSQL Extension for PHP.

LibSQL is a fork of SQLite and this package is #1 LibSQL Driver that run natively using LibSQL Native Extension/Driver/Whatever and support Laravel Ecosystem.

--- ## Installation You can install the package via composer: Then register the service provider at `bootstrap/providers.php` array: The package now include the `turso-php-installer`, so you can install the LibSQL Extension via artisan command: And you can read the all command using `php artisan | grep turso-php` or read the [manual](https://darkstation.mintlify.app/dark-extensions/tools/installer/reference) ## Laravel Sail Don't worry, we also provide Laravel Sail step by step guide for you read: [Sailing with LibSQL](https://darkstation.mintlify.app/dark-extensions/tools/installer/platforms/laravel-sail) ## Environment Variable Overview You need to know the additional configuration in `.env` file, which come from Laravel and which come from LibSQL Driver. And here is the overview of `.env`: **Laravel** - `DB_CONNECTION` key is represent default database connection like `libsql`, `sqlite`, `mysql`, `mariadb`, `pgsql`, and `sqlsrv`. - `DB_DATABASE` key is represent the location of database name or in this case is database filename. **LibSQL Driver** Create a new Turso Database [here](https://docs.turso.tech/quickstart) ### Environment Variables for Turso Driver Below is a list of environment variables used to configure the Turso driver. Each variable plays a role in defining database connection and behavior: - **`DB_AUTH_TOKEN`** You can generate this token using the following command: Alternatively, visit your [Turso Dashboard](https://dashboard.turso.io), select the desired database, and generate the token from there. - **`DB_SYNC_URL`** This URL is automatically generated by Turso when you create a new database. Retrieve the database URL using the command: - **`DB_SYNC_INTERVAL`** This variable defines the interval (in seconds) at which an embedded replica synchronizes with the primary database. It ensures automatic synchronization of the database in the background. **Default:** `5 seconds` **Use case:** Keeps replicas up-to-date with minimal manual intervention. - **`DB_READ_YOUR_WRITES`** Ensures that writes made by a connection are immediately visible to subsequent reads from the same connection. This is vital for maintaining consistency in distributed systems. **Default:** `true` **Use case:** Guarantees clients always see their latest writes. - **`DB_ENCRYPTION_KEY`** Specifies the encryption key used for database encryption. This key is critical for securing data at rest, ensuring only authorized individuals can decrypt the database content. **Default:** Empty **Use case:** Protects sensitive data stored on disk. ## Choose Your Connection Needs **LibSQL** has **4 types of connections** to interact with the database: _In-Memory Connection_, _Local Connection_, _Remote Connection_, and _Remote Replica Connection (Embedded Replica)_
💾 — In-Memory Connection

To be able to use LibSQL in-memory as if you were using SQLite, simply change the following .env:

DB_CONNECTION=libsql
DB_DATABASE=:memory:
  
🖥 — Local Connection

To be able to use LibSQL locally as if you were using SQLite, simply change the following .env:

DB_CONNECTION=libsql
DB_DATABASE=database.sqlite
  

Ignore other LibSQL .env variables.

🌏 — Remote Connection

To use LibSQL Remote Connection only, you can define the following .env variables:

DB_CONNECTION=libsql
DB_AUTH_TOKEN=<your-database-auth-token-from-turso>
DB_SYNC_URL=<your-database-url-from-turso>
  
🌱 — Remote Replica Connection (Embedded Replica)

To configure remote replica connection (embedded replica), you can simply use the following .env:

DB_CONNECTION=libsql
DB_DATABASE=database.sqlite
DB_AUTH_TOKEN=<your-database-auth-token-from-turso>
DB_SYNC_URL=<your-database-url-from-turso>
DB_SYNC_INTERVAL=5
DB_READ_YOUR_WRITES=true
DB_ENCRYPTION_KEY=
  

That's it! How easy to make different connection using LibSQL Driver in Laravel, right?!

## Database Configuration Add this configuration at `config/database.php` inside the `connections` array: > Copy and Paste and do not change it! Or try to change it and will broke your app or give you malfunction. ## 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). ## Changelog Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. ## Contributing Please see [CONTRIBUTING](CONTRIBUTING.md) for details. ## Security Vulnerabilities Please review [our security policy](../../security/policy) on how to report security vulnerabilities. ## Contributors ![Contributors](https://contrib.nn.ci/api?no_bot=true&repo=tursodatabase/turso-driver-laravel) ## License The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

All versions of turso-driver-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
darkterminal/turso-php-installer Version ^2.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tursodatabase/turso-driver-laravel contains the following files

Loading the files please wait ....