I am using laravel 5.6 and using couchbase SDK to establish the database connection. When I run the test on core PHP I am able to access the bucket but using ytake/laravel-couchbase package it’s throwing an error of authentication. My code looks like below:
public function index()
{
$authenticator = new \Couchbase\PasswordAuthenticator();
$authenticator->username(‘test’)->password(‘test123’);
print_r($authenticator);
\DB::connection(‘couchbase’)->table(’test-lab
’)->get();
}
I am not able to figure out how to authenticate using mentioned package or if it automatically does that so what’s wrong here.