laravel上的couchbase参数无效?

I have a problem with laravel 5.4

I am using mpociot/couchbase. I am established the couchbase server and module of php couchbase and php/pcs

But I have the following error.

(1/2) ErrorException
Couchbase\Cluster::__construct() expects exactly 1 parameter, 3 given

config/database.php

  'couchbase' => [
        'driver'   => 'couchbase',
        'host'     => 'localhost',
        'port'     => '8091',
        'bucket'   => 'travel-sample',
        'username' => '',
        'n1ql_hosts' => [
            'http://'.env('DB_HOST', 'localhost').':8093'
        ]
    ],

Where do I mistake? Thanks

This is a bug in mpociot's repo which is no longer supported.

The repo was moved to https://github.com/ORT-Interactive-GmbH/laravel-couchbase and we support this repo ;)

  1. pcs is not necessary for couchbase extension anymore
  2. The constructor in src/Mpociot/Couchbase/Connection.php#L270 should be written as

    $cluster = new Cluster($config['host']);
    if (!empty($config['user']) && !empty($config['password'])) {
        $cluster->authenticateAs(strval($config['user']), strval($config['password']));
    }
    return $cluster;
    

    This is done in ytake/Laravel-Couchbase on the branch for Laravel 5.5.