src/ConnectionResolver.php
public function connection($name = null)
    {
        if (is_null($name)) {
            $name = $this->getDefaultConnection();
        }

        if (! isset($this->connections[$name])) {
            throw new InvalidArgumentException("Connection [{$name}] is not registered.");
        }

        return $this->connections[$name];
    }
public function connection($name = null)
    {
        if (is_null($name)) {
            $name = $this->getDefaultConnection();
        }

        if (! isset($this->connections[$name])) {
            throw new InvalidArgumentException("Connection [{$name}] is not registered.");
        }

        return $this->connections[$name];
    }
public function connection ( $ name = null ) { if ( is_null ( $ name ) ) { $ name = $ this -> getDefaultConnection ( ) ; } if ( ! isset ( $ this -> connections [ $ name ] ) ) { throw new InvalidArgumentException ( "Connection [{$name}] is not registered." ) ; } return $ this -> connections [ $ name ] ; }
Get an API connection instance.

@param  string  $name
@return ConnectionInterface
Get an API connection instance .