gafitescu said:
Check https://github.com/jenssegers/Laravel-MongoDB or https://github.com/navruzm/lmongo
Hi thanks for the reply. I was there already.
I want to return a record by document key, example $user = User::find('517c43667db388101e00000f');
The problem that I have is to write a simple model. I just want to get the idea of how the model works. This is what I got so far but it doesn't seem to work.
<?php
use Jenssegers\Mongodb\Model as Eloquent;
class User extends Eloquent {
protected $collection = 'users';
}
Do I need to write any function in the model class. If so, could you give me an example or hint?
Also, I am getting the following error
Symfony \ Component \ Debug \ Exception \ FatalErrorException
Class 'MongoClient' not found
Thanks
You don't seem to have MongoDB extension installed for PHP. See here to install it : php.net/mongo
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community