Laravel 5.6 ytake/laravel-couchbase authentication issue


#1

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.


#2

hi ,
please go over this: https://docs.couchbase.com/php-sdk/2.6/managing-connections.html


#3

Thank for share information of you!