Example #1
0
 /**
  * Returns the Mongo collection for this query.
  *
  * @param ConnectionInterface $connection Mongo connection.
  * @return Collection collection instance.
  */
 public function getCollection(ConnectionInterface $connection = null)
 {
     $this->connection = isset($connection) ? $connection : Instance::ensure($this->connection, Connection::className());
     $this->calculateCacheParams($this->connection);
     return $this->connection->getCollection($this->from);
 }