dev-master
9999999-dev
The Requires
- php >=5.4.0
- illuminate/support 4.2.*
- guzzlehttp/guzzle ~5.0
by Arthur Numen
1.0
1.0.0.0
The Requires
- php >=5.4.0
- illuminate/support 4.2.*
- guzzlehttp/guzzle ~5.0
by Arthur Numen
Wallogit.com
2017 © Pedro Peláez
Provides a Laravel package to communicate with Google Short Url API., (*1)
Add googleShorUrl to your composer.json file., (*2)
require : {
"numenklatur/google-short-url": "1.0"
}
Or with composer command:, (*3)
composer require "numenklatur/google-short-url": "1.0"
Add provider to your app/config/app.php providers, (*4)
'NumenKlatur\GoogleShortUrl\GoogleShortUrlServiceProvider',
Publish config, (*5)
For Laravel 4 use:, (*6)
php artisan config:publish numenklatur/google-short-url
Add alias to app/config/app.php aliases, (*7)
'ShortUrl' => 'NumenKlatur\GoogleShortUrl\Facades\GoogleShortUrlApi',
Shorten links, (*8)
ShortUrl::shorten('http://numenklatur.me/');
Response format: JSON
{
"kind": "urlshortener#url",
"id": "http://goo.gl/xa55D2",
"longUrl": "http://numenklatur.me/"
}
Expand links, (*9)
ShortUrl::expand('http://bit.ly/ze6poY');
Response format: JSON
{
"kind": "urlshortener#url",
"id": "http://goo.gl/xa55D2",
"longUrl": "http://numenklatur.me/",
"status": "OK"
}