How to install couchbase in laravel project

I installed php SDk in windows 8.1. when i am creating CouchbaseN1qlQuery in laravel project, i am getting error.

CouchbaseCluster’ not found

So i try to install couchbase inside of my laravel project using composer Laravel-Couchbase.

composer require ytake/laravel-couchbase

error

Problem 1
- ytake/laravel-couchbase 1.0.1 requires ext-couchbase >=2.3.2 → the reques
ted PHP extension couchbase is missing from your system.
- ytake/laravel-couchbase 1.0.0 requires ext-couchbase >=2.3.2 → the reques
ted PHP extension couchbase is missing from your system.
- Installation request for ytake/laravel-couchbase ^1.0 → satisfiable by yt
ake/laravel-couchbase[1.0.0, 1.0.1].
To enable extensions, verify that they are enabled in your .ini files:
- C:\wamp64\bin\php\php7.1.9\php.ini
You can also run php --ini inside terminal to see which files are used by PH
P in CLI mode.
Installation failed, reverting ./composer.json to its original content.

But i am getting results when i ran without laravel project. this is my php code.

$cluster = new CouchbaseCluster($url);
$cluster->authenticateAs($username,$pwd);
$bucket =$cluster->openBucket($mybucket);
$query = CouchbaseN1qlQuery::fromString('SELECT todo_name FROM todo ');
$results = $bucket->query($query);

Hi @NaramukAbus,

You might want to ask PHP related questions in the PHP forum: https://www.couchbase.com/forums/c/php-sdk

I’m going to tag @avsej to see if he has any ideas.

1 Like

Thank you @matthew.groves

just follow what the composer says. It seems like you are using different php.ini files when you run php sample without laravel and when running composer command.

Do you have the only php.exe and php.ini on the system?

1 Like

Thank you @avsej
I checked the running php.ini file. correct php.ini file is running. still i am in same issue.