nimbly / cockroachdb-laravel
CockroachDB driver for Laravel 5.4
This package's canonical repository appears to be gone and the package has been frozen as a result.
0.2
2017-09-10 12:57 UTC
This package is auto-updated.
Last update: 2024-08-28 01:57:17 UTC
README
CockroachDB database driver for Laravel 5.4
Usage
Step 1: Install Through Composer
composer require 'nbj/cockroachdb-laravel'
Step 2: Add the Service Provider
Open config/app.php
and, to your "providers" array, add:
Nbj\Cockroach\CockroachServiceProvider::class
Step 3: Add Database Driver Configuration
Open config/datbase.php
and, to your "connections" array, add:
'cockroach' => [ 'driver' => 'cockroach', 'host' => env('DB_HOST', 'HOSTNAME-OF-COCKROACH-SERVER'), 'port' => env('DB_PORT', '26257'), 'database' => env('DB_DATABASE', 'DATABASE-NAME'), 'username' => env('DB_USERNAME', 'root'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'prefix' => '', 'schema' => 'DATABASE-NAME', 'sslmode' => 'prefer', ],
Make sure to update host, port, database, username, password and schema to your configuration. Note the database and schema fields should be the same.