Search code examples
mongodblaravellumen

Does Laravel support MongoB by default or any NoSQL database?


My company runs a huge Lumen 5.1 project on MySQL. They want to add to it analytics, and they that part to use MongoDB

Is it possible to use MongoDB without any third party libraries? I one going to use

https://github.com/jenssegers/laravel-mongodb

But the tech lead thinks Laravel support MongoDB by default, I'm just asking this question to check whether that's true or not.

Edit:

If MongoDB isn't an option, does Laravel support any other NoSQL by default?


Solution

  • Laravel does not support MongoDB by default.

    You would need to use one of several available third-party packages. I like moloquent because it maps mongo db collections to laravel models just like eloquent.

    You can use Redis if you need a natively supported NoSQL db or could consider ElasticSearch (not supported natively) if you are going to store a lot of meta data and then analyse it. Tools like kibana and logstash might get very helpful.