public static function shorten($URL_larga) { $query_URL = "longUrl=" . urlencode($URL_larga); $URL_consulta_API = self::$servicioweb . "shorten?" . self::$versionAPI . "&" . $query_URL . "&" . self::$usuario . "&" . self::$llave; $respuesta_API = json_decode(file_get_contents($URL_consulta_API), true); // Verificar si "errorMessage" existe en el array if (isset($respuesta_API["errorMessage"]) && empty($respuesta_API["errorMessage"])) { if (isset($respuesta_API["results"][$URL_larga]["shortUrl"])) { return $respuesta_API["results"][$URL_larga]["shortUrl"]; } } return false; }

Whoops, looks like something went wrong.

1/1 FatalErrorException in ArticulosController.php line 23: Class 'App\Bitly' not found

  1. in ArticulosController.php line 23