connection() public method

Get a database connection instance.
public connection ( string $name = null ) : LMongo\Connection
$name string
return LMongo\Connection
Esempio n. 1
0
 /**
  * Resolve a connection instance.
  *
  * @param  string  $connection
  * @return \LMongo\Connection
  */
 public static function resolveConnection($connection = null)
 {
     return static::$resolver->connection($connection);
 }
 /**
  * Get a query builder for the given collection.
  *
  * @param  string  $collection
  * @return \LMongo\Query\Builder
  */
 protected function collection($collection)
 {
     return $this->db->connection($this->connection)->collection($collection);
 }