Posts

Showing posts with the label MongoDB

Install and configure Laravel with MongoDB on Windows

Image
Install MongoDB driver for PHP: Check your PHP version using phpinfo(). Download the zip file of dll which is suitable for your system configuration. Extract the archive and put php_mongodb.dll in your PHP extension directory. Add the following line to your php.ini file: extension=php_mongodb.dll Note: On earlier versions, the dll file was called php_mongo.dll, but on newer versions, it is called php_mongodb.dll Restart Apache to load the module. Check the output of phpinfo(). If the driver is installed correctly you should see a MongoDB section in your phpinfo() output as shown in the figure below. MongoDB Driver In case you don't see the section,cross-check the PHP version and architecture again. Install Laravel Package for MongoDB Install the latest stable version of the jenssegers/laravel-mongodb package, compatible with your version of Laravel. To check your Laravel version, run the command php artisan --version inside your Laravel Application folder. In