PHPackages                             getghostr/cockroachdb-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. getghostr/cockroachdb-laravel

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

getghostr/cockroachdb-laravel
=============================

Simple CockroachDB driver for Laravel 6+

v0.5.0(3y ago)29.3k↓50%2MITPHPPHP ^7.4|^8.0

Since Jan 28Pushed 3y ago3 watchersCompare

[ Source](https://github.com/getghostr/cockroachdb-laravel)[ Packagist](https://packagist.org/packages/getghostr/cockroachdb-laravel)[ Docs](https://github.com/getghostr/cockroachdb-laravel)[ RSS](/packages/getghostr-cockroachdb-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (1)Versions (9)Used By (0)

cockroachdb-laravel
===================

[](#cockroachdb-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/649ea37481bc868800f3fb97e939e9c08c8a8cacd71f292aee924a0b87ad05e6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67657467686f7374722f636f636b726f61636864622d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/getghostr/cockroachdb-laravel)[![Total Downloads](https://camo.githubusercontent.com/acb764818396c19cd529e79c19d803e5f9b206befd079cd664298c658319c0ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67657467686f7374722f636f636b726f61636864622d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/getghostr/cockroachdb-laravel)

Simple CockroachDB driver for Laravel 6+

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

[](#installation)

You can install the package via composer:

```
composer require getghostr/cockroachdb-laravel

```

Usage
-----

[](#usage)

### Step 1

[](#step-1)

If you're not using package discovery please add the following to your providers array in `config/app.php`:

```
Ghostr\Cockroach\CockroachServiceProvider::class,
```

### Step 2

[](#step-2)

Head over to your `config/database.php` and add the following to your connections array:

```
'cockroach' => [
    'driver' => 'cockroach',
    'url' => env('DATABASE_URL'),
    'host' => env('DB_HOST', '127.0.0.1'),
    'port' => env('DB_PORT', '5432'),
    'database' => env('DB_DATABASE', 'forge'),
    'username' => env('DB_USERNAME', 'forge'),
    'password' => env('DB_PASSWORD', ''),
    'charset' => 'utf8',
    'prefix' => '',
    'prefix_indexes' => true,
    'schema' => 'public',
    'sslmode' => 'prefer',
],
```

Special features
----------------

[](#special-features)

### Index stored columns

[](#index-stored-columns)

This package adds support for [index stored columns](https://www.cockroachlabs.com/docs/stable/indexes.html#storing-columns)
They can be declared in migrations like so:

```
Schema::table('my_table', function (Blueprint $table) {
    // Single stored column
    $table->index('col1')->storing('col2');

    // Multiple stored columns
    $table->index('col1')->storing(['col2', 'col3'])
})
```

**NOTE**: Index name generation is unaffected by stored columns

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Credits
-------

[](#credits)

- [Ghostr](https://github.com/GetGhostr)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

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

Every ~136 days

Total

7

Last Release

1116d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b1a9a39f540b62d115b157a36eb3ebeb32274e5f287df35a4a19e873bf09385?d=identicon)[J0sh0nat0r](/maintainers/J0sh0nat0r)

![](https://www.gravatar.com/avatar/f1ad1d02c213ea9a73537e656af2d2fabc9ddf40ae1b80176e0b29e1b8b4e1cc?d=identicon)[marcuz](/maintainers/marcuz)

![](https://www.gravatar.com/avatar/da720e51b04ce4a7a45c2f032c1132f1b6ca8f2271d97cb58954be801bb2fbc5?d=identicon)[TheodoorP](/maintainers/TheodoorP)

---

Top Contributors

[![TheodoorP](https://avatars.githubusercontent.com/u/17050455?v=4)](https://github.com/TheodoorP "TheodoorP (5 commits)")[![J0sh0nat0r](https://avatars.githubusercontent.com/u/16763483?v=4)](https://github.com/J0sh0nat0r "J0sh0nat0r (2 commits)")

---

Tags

hacktoberfestlaraveleloquentcockroachdbcockroachdb-laravelgetghostr

### Embed Badge

![Health badge](/badges/getghostr-cockroachdb-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/getghostr-cockroachdb-laravel/health.svg)](https://phpackages.com/packages/getghostr-cockroachdb-laravel)
```

###  Alternatives

[silber/bouncer

Eloquent roles and abilities.

3.6k4.4M25](/packages/silber-bouncer)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)

PHPackages © 2026

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