arisharyanto / bitlys
Libraries to create Short URL with Bitly API
Installs: 556
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/arisharyanto/bitlys
Requires
- php: ~5.5|~7.0
This package is not auto-updated.
Last update: 2025-10-12 01:37:38 UTC
README
Create Shorten URL with Bitly API in Laravel
How to install
- Run in your terminal:
$ cd yourprojectdirectory
$ composer require arisharyanto/bitlys
- Add the service providers in config/app.php:
Arisharyanto\Bitlys\BitlysServiceProvider::class,
- Run this command in the terminal
$ php artisan vendor:publish --provider="Arisharyanto\Bitlys\BitlysServiceProvider"
- Add access_token from your bitly apps in config/bitlys.php:
'access_token' => 'your access token',
How to use
Just add use Arisharyanto\Bitlys\Bitlys
Bitlys::shorten($longUrl); # Create short bitly url
Bitlys::expand($shortUrl); # Convert shortUrl to longUrl
Bitlys::clicks($shortUrl); # Returns the number of clicks on a single Bitlink
Bitlys::countries($shortUrl); # Returns metrics about the countries referring click traffic to a single Bitlink
Simple !
Who is using Bitlys
License
See the license https://github.com/Aris-haryanto/Bitlys-Laravel/blob/master/LICENSE
Author
Aris Haryanto visit my website https://arindasoft.wordpress.com/