src/Bridge.php
public function usingService($serviceName)
    {
        // Check if service exists first.
        if (! config()->has('watson-bridge.services.'.$serviceName)) {
            throw new WatsonBridgeException('Unknown service "'.$serviceName.'" try adding it to the list of services in watson-bridge config.');
        }

        // Get service endpoint.
        $serviceUrl = config('watson-bridge.services.'.$serviceName);

        // Reset Client.
        $this->setClient(rtrim($this->endpoint, '/').'/'.ltrim($serviceUrl, '/'));

        return $this;
    }
public function usingService($serviceName)
    {
        // Check if service exists first.
        if (! config()->has('watson-bridge.services.'.$serviceName)) {
            throw new WatsonBridgeException('Unknown service "'.$serviceName.'" try adding it to the list of services in watson-bridge config.');
        }

        // Get service endpoint.
        $serviceUrl = config('watson-bridge.services.'.$serviceName);

        // Reset Client.
        $this->setClient(rtrim($this->endpoint, '/').'/'.ltrim($serviceUrl, '/'));

        return $this;
    }
public function usingService ( $ serviceName ) { // Check if service exists first. if ( ! config ( ) -> has ( 'watson-bridge.services.' . $ serviceName ) ) { throw new WatsonBridgeException ( 'Unknown service "' . $ serviceName . '" try adding it to the list of services in watson-bridge config.' ) ; } // Get service endpoint. $ serviceUrl = config ( 'watson-bridge.services.' . $ serviceName ) ; // Reset Client. $ this -> setClient ( rtrim ( $ this -> endpoint , '/' ) . '/' . ltrim ( $ serviceUrl , '/' ) ) ; return $ this ; }
Set Watson service being used.

@param string $serviceName

@return $this
Set Watson service being used .