2017 © Pedro Peláez
 

library laravel-mandango

This small package will allow you to use the Mandango ODM in your Laravel application.

image

adamlc/laravel-mandango

This small package will allow you to use the Mandango ODM in your Laravel application.

  • Monday, August 12, 2013
  • by adamlc
  • Repository
  • 1 Watchers
  • 2 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel Mandango

This small package will allow you to use the Mandango ODM in your Laravel application., (*1)

This package has been thrown together quite quickly. I will update it when I have time!, (*2)

Composer

To install Laravel Mandango as a Composer package to be used with Laravel 4, add this to your composer.json:, (*3)

"adamlc/laravel-mandango": "dev-master"

Run composer update., (*4)

Once it's installed, you can register the service provider and facade in app/config/app.php:, (*5)

'providers' => array(
    'Adamlc\LaravelMandango\LaravelMandangoServiceProvider',
)
'aliases' => array(
    'Mandango' => 'Adamlc\LaravelMandango\LaravelMandangoFacade'
)

Then publish the config file with php artisan config:publish adamlc/laravel-mandango. This will add the file app/config/packages/adamlc/laravel-mandango/mandango.php., (*6)

Configuration

In the configuration file you will need to configure you MongoDB connection and setup your Mondator schema which will be used for automatic class generation., (*7)

Mondator Class Generation

Once you have configured your schema as per the documentation you need to run thr artisan command to generate the classes, make sure you run composer dump-autoload followed by php artisan mondator:run, (*8)

When Mandator has generated your classes you need to tell composer how to auto load them. Add the following to your composer.json under classmap:, (*9)

"classmap": [
    "app/mandango"
],

After that make sure you do another composer dump-autoload, (*10)

Usage

Once the above steps have been completed you can simply get your repository by calling like this:, (*11)

$articleRepository = Mandango::getRepository('Model\Article');

The Versions

12/08 2013

dev-master

9999999-dev

This small package will allow you to use the Mandango ODM in your Laravel application.

  Sources   Download

MIT

The Requires

 

by Adam Curtis