/** * Set a model instance for the model being queried. * * @param \LMongo\Eloquent\Model $model * @return \LMongo\Eloquent\Builder */ public function setModel(Model $model) { $this->model = $model; $this->query->collection($model->getCollection()); return $this; }