Url Shortener for Laravel 5 with support for Google and Bitly drivers.
abstractrs/url-shortener is a Laravel package for url shortener for laravel 5 with support for google and bitly drivers..
It currently has 0 GitHub stars and 46 downloads on Packagist (latest version 2.0.1).
Install it with composer require abstractrs/url-shortener.
Discover more Laravel packages by abstractrs
or browse all Laravel packages to compare alternatives.
Last updated
URL shortener package that gives a convenient Laravel Facade for mremi/UrlShortener
Laravel | translation :---------|:---------- 5.1.x | 1.0.x 5.2.x | 1.0.1 and higher 5.5.x | 1.0.7 and higher 5.8.x | 2.0 and higher
Require through composer
composer require abstractrs/url-shortener
Or manually edit your composer.json file:
"require": {
abstractrs/url-shortener": "^2.0"
}
In config/app.php, add the following entry to the end of the providers array:
Abstractrs\UrlShortener\UrlShortenerServiceProvider::class,
And the following alias:
'UrlShortener' => Abstractrs\UrlShortener\Facades\UrlShortener::class,
Publish the configuration file, the form view and the language entries:
php artisan vendor:publish --provider="Abstractrs\UrlShortener\UrlShortenerServiceProvider"
Check the config files for the environment variables you need to set for the selected driver.
```php
\UrlShortener::shorten('http://google.com'); // Uses default driver as per config settings
\UrlShortener::driver('bitly')->shorten('http://google.com');
```
```php
\UrlShortener::expand('http://google.com'); // Uses default driver as per config settings
\UrlShortener::driver('bitly')->expand('http://google.com');
```