Closed spresnac closed 6 years ago
Please fix your `CouchbaseServiceProvider::register()' to this:
/** * Register the service provider. */ public function register() { // Add database driver. $this->app->singleton('couchbase.connection', function($app){ $connectionName = config('database.connections.'.config('database.default')); return new Connection($connectionName); }); $this->app->resolving('db', function ($db) { $db->extend('couchbase', function ($config) { return app('couchbase.connection'); }); }); }
This will enable the usage of the current used connection. Yet, this function only uses the 'couchbase'-named configuration.
Please fix your `CouchbaseServiceProvider::register()' to this:
This will enable the usage of the current used connection. Yet, this function only uses the 'couchbase'-named configuration.