When I trying to run laravel with mongo, I've receiving Class 'MongoClient' not found.
Do anyone know how to fix it ?
have you followed these docs https://github.com/LaraDock/laradock#Use-Mongo
seems you didn't required jenssegers/mongodb
No, the problem was with PHP driver.
I've changed the mongo part of dockerfile for PHP-FPM to this:
RUN curl https://pecl.php.net/get/mongo-1.5.8.tgz > /tmp/mongo.tgz RUN tar -xpzf /tmp/mongo.tgz -C /tmp RUN mv /tmp/mongo-1.5.8 /usr/src/php/ext RUN docker-php-ext-install mongo-1.5.8 RUN pecl install mongo && docker-php-ext-enable mongo
And now it work
@AminMkh
Most helpful comment
No, the problem was with PHP driver.
I've changed the mongo part of dockerfile for PHP-FPM to this:
And now it work