-1

How to add

new MongoClient('mongodb://localhost');

in cakephp 3x __construct . I am trying to setup mongodb in cakephp-3.2, and also is there any plugin for cakephp3.2 to have mongodb

Ragu N S
  • 17
  • 1
  • 7

1 Answers1

0

I found solution in https://stackoverflow.com/a/31274207/4244742 . To bring 3rd party class we need to add class file in vendor folder and then we need to use require_once(ROOT . DS . 'vendor' . DS . "my_library_folder" . DS . "my_library_base_class.php") in bootstrap.php. Now you can use it AppController under parent::initialize();

Community
  • 1
  • 1
Ragu N S
  • 17
  • 1
  • 7