public static function getExternalIP()
    {
        $ip = \Cache::rememberForever('external-ip-address', function () {
            $response = Curl::get('http://ipinfo.io/ip');
            $ip = trim($response, "\t\r\n");
            try {
                $validator = Validator::make(['ip' => $ip], ['ip' => 'ip']);
                $validator->validate();
            } catch (ValidationException $e) {
                $ip = null;
            }

            return $ip;
        });

        return $ip;
    }
public static function getExternalIP()
    {
        $ip = \Cache::rememberForever('external-ip-address', function () {
            $response = Curl::get('http://ipinfo.io/ip');
            $ip = trim($response, "\t\r\n");
            try {
                $validator = Validator::make(['ip' => $ip], ['ip' => 'ip']);
                $validator->validate();
            } catch (ValidationException $e) {
                $ip = null;
            }

            return $ip;
        });

        return $ip;
    }
public static function getExternalIP ( ) { $ ip = \ Cache :: rememberForever ( 'external-ip-address' , function ( ) { $ response = Curl :: get ( 'http://ipinfo.io/ip' ) ; $ ip = trim ( $ response , "\t\r\n" ) ; try { $ validator = Validator :: make ( [ 'ip' => $ ip ] , [ 'ip' => 'ip' ] ) ; $ validator -> validate ( ) ; } catch ( ValidationException $ e ) { $ ip = null ; } return $ ip ; } ) ; return $ ip ; }
Returns instance's external IP address.

@return mixed
Returns instance s external IP address .