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
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
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();