Looking to hire Laravel developers? Try LaraJobs

laravel-bitly maintained by elmsellem

Description
Laravel package for generating bitly short urls
Last update
2022/04/17 20:33 (dev-master)
License
Links
Downloads
12
Tags

Comments
comments powered by Disqus

Laravel Bitly Package

A laravel package for generating Bitly short URLs.

For more information see Bitly

Download laravel-bitly using composer

composer require elmsellem/laravel-bitly

Configure Bitly credentials

php artisan vendor:publish --provider="Elmsellem\Bitly\BitlyServiceProvider"

Add this in you .env file

BITLY_ACCESS_TOKEN=your_secret_bitly_access_token

Usage

<?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