Waavi / url-shortener by sildraug

Url Shortener for Laravel 5 with support for Google and Bitly drivers.
163,763
62
4
Package Data
Maintainer Username: sildraug
Maintainer Contact: info@waavi.com (Waavi)
Package Create Date: 2016-01-01
Package Last Update: 2022-01-10
Language: PHP
License: MIT
Last Refreshed: 2024-12-17 03:03:20
Package Statistics
Total Downloads: 163,763
Monthly Downloads: 581
Daily Downloads: 16
Total Stars: 62
Total Watchers: 4
Total Forks: 33
Total Open Issues: 9

Laravel 5 url shortener

Latest Version on Packagist Software License Build Status Total Downloads

Introduction

URL shortener package that gives a convenient Laravel Facade for mremi/UrlShortener

WAAVI is a web development studio based in Madrid, Spain. You can learn more about us at waavi.com

Laravel compatibility

Laravel | translation :---------|:---------- 5.1.x | 1.0.x 5.2.x | 1.0.1 and higher 5.5.x | 1.0.7 and higher

Installation and Setup

Require through composer

composer require waavi/url-shortener 1.0.x

Or manually edit your composer.json file:

"require": {
    "waavi/url-shortener": "1.0.x"
}

In config/app.php, add the following entry to the end of the providers array:

Waavi\UrlShortener\UrlShortenerServiceProvider::class,

And the following alias:

'UrlShortener' => Waavi\UrlShortener\Facades\UrlShortener::class,

Publish the configuration file, the form view and the language entries:

php artisan vendor:publish --provider="Waavi\UrlShortener\UrlShortenerServiceProvider"

Check the config files for the environment variables you need to set for the selected driver.

Usage

Shorten a url

```php
\UrlShortener::shorten('http://google.com'); // Uses default driver as per config settings
\UrlShortener::driver('bitly')->shorten('http://google.com');
```

Expand a url

```php
\UrlShortener::expand('http://google.com'); // Uses default driver as per config settings
\UrlShortener::driver('bitly')->expand('http://google.com');
```