A laravel package for generating Bitly short URLs.
For more information see Bitly
composer require elmsellem/laravel-bitly
php artisan vendor:publish --provider="Elmsellem\Bitly\BitlyServiceProvider"
Add this in you .env file
BITLY_ACCESS_TOKEN=your_secret_bitly_access_token
<?php
$url = app('bitly')->getShortenUrl('https://www.google.com/'); // https://bit.ly/3uOZj27
using facade:
<?php
use Bitly;
$url = Bitly::getShortenUrl('https://www.google.com/'); // https://bit.ly/3uOZj27