kerodev / short-link
Short link by Bitly
v1
2022-09-24 14:30 UTC
Requires
- ext-http: *
- ext-json: *
- guzzlehttp/guzzle: 7.5.x-dev
This package is auto-updated.
Last update: 2025-06-26 01:41:56 UTC
README
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