kerodev/short-link

Short link by Bitly

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/kerodev/short-link

v1 2022-09-24 14:30 UTC

This package is auto-updated.

Last update: 2025-09-26 02:14:59 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