public function connection($connectionName = null)
{
// Try getting connection based on given name
if ($connectionName === null) {
return $this->config()->defaultConnection();
} elseif ($connection = $this->config()->connection($connectionName)) {
return $connection;
} elseif ($connection = $this->config()->defaultConnection()) {
return $connection;
}
throw new Exception("Connection '" . $connectionName . "' does not exist. Please setup connection using Spot\\Config::addConnection().");
}