1

Can any one know how to configure mongoDB with laravel5, there is a package

{
  "require": {
      "navruzm/lmongo": "*"
  }
}

But it work in laravel4, Is anyone configure it in laravel5 or used another alternative ?

1 Answer 1

2

jenssegers laravel Mongo

The dev branch of jenssegers will work with L5 but its dev branch so not to be relied on.

Also Laravel 5 is not officially released or stable yet so it would not be advised to do anything worthwhile with the current V5.

Laravel Release Notes

Your require info will be as follows :

{
    "require": {
        "jenssegers/mongodb": "*"
    }
}

add in the service provider to your app.php

'Jenssegers\Mongodb\MongodbServiceProvider',

The service provider will register a mongodb database extension with the original database manager. There is no need to register additional facades or objects. When using mongodb connections, Laravel will automatically provide you with the corresponding mongodb objects.

Everything else should be as normal with L5 as with L4. More information on the installation and configuring is available at the development git repo.

Sign up to request clarification or add additional context in comments.

4 Comments

i have search this package atrauzzi/laravel-mongodb in packagist.org which have support in laravel5
@MansoorAkhtar jenssegers DEVELOPMENT branch is working with the latest L5 beta.
@Prgrindis I have search in packagist.org jenssegers/mongodb dev-master version support laravel 4 , but there are not explanation of laravel 5 can you please send me the link so that i will be able to get help from it thanks in advance
@MansoorAkhtar I have added the extra info but all of the required reading is available at the git repo : github.com/jenssegers/laravel-mongodb/tree/develop again i would like to suggest you stick to Laravel 4 stable release for now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.