an3/laravel-couchdb
Work-in-progress CouchDB integration for Laravel 5.x, providing an Eloquent-style model and query builder inspired by jenssegers/laravel-mongodb. Intended to let you interact with CouchDB using familiar Laravel ORM patterns.
Model::create(), Model::find()).where(), orderBy() with CouchDB’s Mango queries).hasOne, belongsTo, etc. (requires manual _id references or application logic).paginate() may not translate cleanly to CouchDB’s _changes feed or views._changes feed for replication lag or failed updates.couchdb-php-client (deprecated) or ibm-cloud-sdk (if using IBM’s fork). Verify compatibility with your PHP version (e.g., PHP 7.4+ may need updates).find() vs. where() operations).User::all() → CouchDB model).where())._id fields).CouchDBServiceProvider. Ensure it doesn’t conflict with other providers (e.g., queue workers).created) may not trigger as expected in CouchDB (test with Model::dispatchesEvents()).PUT /db/_design/doc/views/by_field). Automate this in deployment._bulk_docs for batch inserts/updates (not Eloquent’s insert())._conflicts; implement resolution logic (e.g., last-write-wins or custom merge strategies)..env with CouchDB credentials (e.g., COUCHDB_URL=http://user:pass@localhost:5984).composer require an3/laravel-couchdb
config/couchdb.php).CouchDB\Eloquent\Model instead of Illuminate\Database\Eloquent\Model:
use CouchDB\Eloquent\Model as CouchModel;
class User extends CouchModel {
protected $database = 'my_db';
protected $primaryKey = '_id';
}
where() clauses, pagination).hasMany via _id arrays).curl or a custom artisan command)._rev (revision IDs) to track document changes; implement a strategy for rollbacks.couchdb-php-client for security updates (if used)._bulk_docs calls). Use Laravel’s logging or a dedicated NoSQL monitoring tool (e.g., Prometheus + Grafana).httpd_timeout or implement retries.stale=update_after in Mango queries to handle conflicts.Fiddler/Charles to inspect CouchDB HTTP requestsHow can I help you explore Laravel packages today?