Skip to content

Instantly share code, notes, and snippets.

@lpj145
Created September 15, 2017 17:17
Show Gist options
  • Save lpj145/e3cf5d5b44e7393806e1d589c8c0a956 to your computer and use it in GitHub Desktop.
Save lpj145/e3cf5d5b44e7393806e1d589c8c0a956 to your computer and use it in GitHub Desktop.
<?php
require 'vendor/autoload.php';
use Mongolid\Manager;
use Mongolid\Connection\Connection;
$manager = new Manager(new Connection('mongodb://localhost:27017'));
class Post extends Mongolid\ActiveRecord {
protected $collection = 'posts';
}
$post = new \App\Posts();
$post::all();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment