Skip to content

keroles19/short-link

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Shortner Link Package

Shorten Long Urls Using Bitly Api.

INSTALLATION

Install the package through Composer.

composer require kerodev/short-link

CONFIGURATION

Required configuration file (.env) file

// add token inside env.php

SHORTEN_TOKEN=""
SHORTEN_URL="https://api-ssl.bitly.com/v4/shorten"

Optional configuration file (useful if you plan to have full control)

php artisan vendor:publish --tag="shortconfig"

HOW TO USE

Quick Usage

// In your controller
// Use The Helper class Bitly to shorten urls
use Shorter;

return Shorter::shorten('https://www.youtube.com');

// get link only
$short = Shorter::shorten('https://www.youtube.com');
return $short->link;

Credits

License

The Http Client Package is open-sourced software licensed under the MIT license

About

Shorten Long Urls Using Bitly Api.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages