PHP code example of flatline / mongol

1. Go to this page and download the library: Download flatline/mongol library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

flatline / mongol example snippets


'Flatline\Mongol\MongolServiceProvider'

'Mongol' => 'Flatline\Mongol\Mongol'

'default' => array(
    'host'     => 'alex.mongohq.com',
    'port'     => 10002,
    'username' => 'your_username',
    'password' => 'your_db_password',
    'database' => 'your_db_name',
),

'other_credentials' => array(
    'host'     => 'localhost',
    'username' => 'your_admin_username',
    'password' => 'your_admin_db_password',
    'database' => 'your_db_name',
    'admin'    => true,
),

'driver' => 'mongol'

Mongol::connection();

Mongol::connection('group');

Mongol::connection()->getDB();

Mongol::connection()->getDB('other_db_name')

$ php artisan config:publish flatline/mongol