PHPackages                             aarcarv/laravel-couchdb - 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. aarcarv/laravel-couchdb

ActiveLibrary

aarcarv/laravel-couchdb
=======================

CouchDB database driver for Laravel 4

011PHP

Since Nov 3Pushed 3y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-couchdb
===============

[](#laravel-couchdb)

CouchDB database driver for Laravel 4

Dependencies
------------

[](#dependencies)

*laravel-couchdb* uses [doctrine/couchdb-client](https://github.com/doctrine/couchdb-client). This package will be automatically downloaded for you via composer.

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

[](#installation)

Add the package to your `composer.json` and run `composer update`.

```
{
    "require": {
        "rbewley4/laravel-couchdb": "dev-master"
    }
}
```

Add the service provider in `app/config/app.php`:

```
'Rbewley4\Laravel\Couchdb\CouchdbServiceProvider',
```

The service provider will register a couchdb database extension with the original database manager. There is no need to register additional facades or objects. When using couchdb connections, Laravel will automatically provide you with the corresponding couchdb objects.

Configuration
-------------

[](#configuration)

Change your default database connection name in `app/config/database.php`:

```
'default' => 'couchdb',
```

And add a new couchdb connection:

```
'couchdb' => array(
    'driver'   => 'couchdb',
    'type'     => 'socket',
    'host'     => 'localhost',
    'ip'       => null,
    'port'     => 5984,
    'dbname'   => 'database',
    'user'     => 'username',
    'password' => 'password',
    'logging'  => false,
),
```

Eloquent, Query Builder, Schema Builder
---------------------------------------

[](#eloquent-query-builder-schema-builder)

Sorry, we do not support these components at this time.

Examples
--------

[](#examples)

*laravel-couchdb* provides you with direct access to a CouchDBClient object, and expects you to use it for all CouchDB interaction.

For more information on CouchDBClient, see [doctrine/couchdb-client](https://github.com/doctrine/couchdb-client).

**Get handle to CouchDBClient**

```
/**
 * @var \Rbewley4\Laravel\Couchdb\CouchdbConnection
 */
$connection = DB::connection('couchdb');

/**
 * @var \Doctrine\CouchDB\CouchDBClient
 */
$couchdb = $connection->getCouchDB();
```

> **Note**: you can invoke methods on CouchDBClient by invoking them on CouchdbConnection. This is accomplished via the use of magic methods.

**Create/Update/Find Document**

Here we demonstrate three different operations that you can perform on CouchDB, and we show three different ways that you can invoke these methods:

```
$connection = DB::connection('couchdb');
$couchdb = $connection->getCouchDB();

list($id, $rev) = $connection->postDocument(array('foo' => 'bar'));
$couchdb->putDocument(array('foo' => 'baz'), $id, $rev);
$doc = DB::connection('couchdb')->findDocument($id);
```

Note that all three methods can be called on $connection or $couchdb.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1482e671c010774dd1c4d960c4206bb628823bbc3c0f8e74ca24d9ffd84fa4b4?d=identicon)[aarcarv](/maintainers/aarcarv)

### Embed Badge

![Health badge](/badges/aarcarv-laravel-couchdb/health.svg)

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

PHPackages © 2026

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