druunkman/apidocmaker

dev-master 2018-08-23 21:56 UTC

This package is not auto-updated.

Last update: 2025-06-22 09:57:24 UTC


README

Latest Stable Version Total Downloads Build Status Coverage Status Donate

An Eloquent model and Query builder with support for MongoDB, using the original Laravel API. This library extends the original Laravel classes, so it uses exactly the same methods.

Table of contents

Installation

Make sure you have the MongoDB PHP driver installed. You can find installation instructions at http://php.net/manual/en/mongodb.installation.php

WARNING: The old mongo PHP driver is not supported anymore in versions >= 3.0.

Installation using composer:

composer require jenssegers/mongodb

Laravel version Compatibility

Laravel Package
4.2.x 2.0.x
5.0.x 2.1.x
5.1.x 2.2.x or 3.0.x
5.2.x 2.3.x or 3.0.x
5.3.x 3.1.x or 3.2.x
5.4.x 3.2.x
5.5.x 3.3.x
5.6.x 3.4.x

And add the service provider in config/app.php:

Jenssegers\Mongodb\MongodbServiceProvider::class,

For usage with Lumen, add the service provider in bootstrap/app.php. In this file, you will also need to enable Eloquent. You must however ensure that your call to $app->withEloquent(); is below where you have registered the MongodbServiceProvider:

$app->register(Jenssegers\Mongodb\MongodbServiceProvider::class);

$app->withEloquent();

From: http://laravel.com/docs/database#query-logging