/** * Return the content of the Site Map */ public function shortenUrl($url) { $link = new Link(); $link->setLongUrl($url); $googleProvider = new GoogleProvider(env('SHORT_URL_API'), array('connect_timeout' => 1, 'timeout' => 1)); $googleProvider->shorten($link); return $link; }
/** * Return the content of the Site Map */ public function shortenUrl($url) { $link = new Link(); $link->setLongUrl($url); $googleProvider = new GoogleProvider('AIzaSyD6K3mZLFLxYtvpXl_F3L4xTF6H7lO7BZg', array('connect_timeout' => 1, 'timeout' => 1)); $googleProvider->shorten($link); // dd($link); return $link; }