hpaul / mongor

Mongo ORM support for Laravel 3 bundle
23 stars 11 forks source link

Add multiple configures support #20

Closed jaceju closed 11 years ago

jaceju commented 11 years ago

Now, the attribute connection of model.php is used for set configure file.

Example:

<?php

use Mongor\Model;

class MyCollection extends Model
{
    public static $collection = 'my_collection';

    // Load options of "config/my_database.php"
    public $connection = 'other_database'; 
}

By default, connection is database for config/database.php.