trendylabs/shortener

API for Laravel 5 to get short URLs via Googl Shortener
144 1
Install
composer require trendylabs/shortener
License:MIT
Last Updated:Jan 20, 2016
Links: GitHub  ·  Packagist
Maintainer: vics80

Shortener

API Form Laravel 5 to convert long URLs in Google Shortener format

Installation

Install the package through Composer. Edit your project's composer.json file by adding:

"require": {
	"trendylabs/shortener": "dev-master"
}

Next, run the Composer update command from the Terminal:

composer update

Add the Service Provider. To do this open your config/app.php file.

Add a new line to the service providers array:

TrendyLabs\Shortener\ShortenerServiceProvider::class,

And a new line to the aliases array:

'Shortener' => TrendyLabs\Shortener\Facade::class,

Now you need to publish config file:

php artisan vendor:publish

Then you can edit your Google API Keys

Usage

Now you're ready to get short URLs via Googl Shortener:

// get short url
\Shortener::short($url);

// get Google response
\Shortener::response($url);

Related Packages

madeny/url-shortener

Url Shortener for Laravel 5 with support for Google and Bitly drivers.

412 5
appsketch/shortest

A shorte.st wrapper for Laravel 5 and 5.1.

40 0
mbarwick83/shorty

Google Url Shortener API Package for Laravel 5.1

204,507 31
lex142/laravel-url-shortener

Powerful URL shortening tools in Laravel

1,621 0
laracrafts/laravel-url-shortener

Powerful URL shortening tools in Laravel

113,059 97