2017 © Pedro Peláez
 

library shortlink

A Laravel 5.5 shortener package

image

div-art/shortlink

A Laravel 5.5 shortener package

  • Monday, February 12, 2018
  • by div-art
  • Repository
  • 4 Watchers
  • 3 Stars
  • 37 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 16 Versions
  • 12 % Grown

The README.md

ShortLink

Short Link package for Laravel 5.5, (*1)

Installation

To install, run the following in your project directory:, (*2)

``` bash $ composer require div-art/shortlink, (*3)


Then in `config/app.php` add the following to the `providers` array:

\DivArt\ShortLink\ShortLinkServiceProvider::class,, (*4)


Also in `config/app.php`, add the Facade class to the `aliases` array:

'ShortLink' => \DivArt\ShortLink\Facades\ShortLink::class,, (*5)


## Configuration To publish ShortLink's configuration file, run the following `vendor:publish` command:

php artisan vendor:publish --provider="DivArt\ShortLink\ShortLinkServiceProvider", (*6)


This will create a shortlink.php in your config directory. Here you must enter your Shortener URL API Key. ## Usage **Be sure to include the namespace for the class wherever you plan to use this library**

use DivArt\ShortLink\Facades\ShortLink;, (*7)


To shorten a URL: ``` php $url = "https://www.google.com"; ShortLink::google($url); // return https://goo.gl/Njku

To get stats of clicks on shortened URL:, (*8)

``` php $url = https://goo.gl/Njku;, (*9)

ShortLink::clicks($url);, (*10)


## Methods ``` php ShortLink::google(); // return shortener url like goo.gl/XXXXXX ShortLink::bitly(); // return shortener url like bit.ly/XXXXXX ShortLink::rebrandly(); // return shortener url like rebrand.ly/XXXXXX ShortLink::clicks(); // return count of clicks on a shortener url ShortLink::expand(); // return long url

Services

goo.gl, (*11)

bit.ly, (*12)

rebrand.ly, (*13)

License

The MIT License (MIT). Please see License File for more information., (*14)

The Versions

12/02 2018

dev-master

9999999-dev

A Laravel 5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art

laravel shortlink div-art

12/02 2018

0.2.2

0.2.2.0

A Laravel 5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art

laravel shortlink div-art

19/01 2018

0.2.1

0.2.1.0

A Laravel 5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art

laravel shortlink div-art

19/01 2018

0.2.0

0.2.0.0

A Laravel 5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art

laravel shortlink div-art

18/01 2018

0.1.8

0.1.8.0

A Laravel 5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art

17/01 2018

0.1.7

0.1.7.0

A Laravel5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art

16/01 2018

0.1.6

0.1.6.0

A Laravel5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art

16/01 2018

0.1.5

0.1.5.0

A Laravel5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art

16/01 2018

0.1.4

0.1.4.0

A Laravel5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art

16/01 2018

0.1.3

0.1.3.0

A Laravel5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art

16/01 2018

0.1.2

0.1.2.0

A Laravel5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art

16/01 2018

0.1.1

0.1.1.0

A Laravel5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art

16/01 2018

0.1.0

0.1.0.0

A Laravel5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art

16/01 2018

0.0.3

0.0.3.0

A Laravel5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art

15/01 2018

0.0.2

0.0.2.0

A Laravel5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art

12/01 2018

0.0.1

0.0.1.0

A Laravel5.5 shortener package

  Sources   Download

MIT

The Requires

 

by Avatar div-art