collection() public method

Return new Query Builder instance
public collection ( string $collection ) : Builder
$collection string
return LMongo\Query\Builder
 /**
  * Retrieve a user by the given credentials.
  *
  * @param  array  $credentials
  * @return Illuminate\Auth\UserInterface|null
  */
 public function retrieveByCredentials(array $credentials)
 {
     $query = $this->connection->collection($this->collection);
     foreach ($credentials as $key => $value) {
         if (!str_contains($key, 'password')) {
             $query->where($key, $value);
         }
     }
     $user = $query->first();
     if (!is_null($user)) {
         $user['id'] = (string) $user['_id'];
         return new GenericUser((array) $user);
     }
 }
 /**
  * Retrieve a user by by their unique identifier and "remember me" token.
  *
  * @param  mixed $identifier
  * @param  string $token
  * @return \Illuminate\Auth\UserInterface|null
  */
 public function retrieveByToken($identifier, $token)
 {
     $user = $this->connection->collection($this->collection)->find($identifier);
     return $token == $user->getRememberTokenName() ? $user : null;
 }
 /**
  * Begin a new database query against the collection.
  *
  * @return LMongo\Query\Builder
  */
 protected function getCollection()
 {
     return $this->connection->collection($this->collection);
 }