PHPackages                             yeamin/bitly-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. yeamin/bitly-laravel

ActiveLibrary[API Development](/categories/api)

yeamin/bitly-laravel
====================

A laravel package to maintain bitly api, to short link, get full link, description, status and other features offered by bitly.

2.0.0(6y ago)25MITPHPPHP &gt;=7.0

Since Mar 11Pushed 6y ago1 watchersCompare

[ Source](https://github.com/SyedArafat/bitly-laravel)[ Packagist](https://packagist.org/packages/yeamin/bitly-laravel)[ RSS](/packages/yeamin-bitly-laravel/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (7)Used By (0)

Bitly-laravel
=============

[](#bitly-laravel)

A simple package to use bitly api effectively to short link, get full link and other features offered by bitly.

For more information see [Bitly](https://bitly.com/)

Requirements
------------

[](#requirements)

Laravel 5.1 or later, minimum php version 7.0

Installation
------------

[](#installation)

Installation is a quick 3 step process:

1. Download bitly-laravel using composer
2. Enable the package in app.php
3. Configure your Bitly credentials

Use the different methods offered in this package to access different bitly services.

### Step 1: Download laravel-bitly using composer

[](#step-1-download-laravel-bitly-using-composer)

Add yeamin/bitly-laravel package for laravel by running the command:

```
composer require yeamin/bitly-laravel

```

### Step 2: Enable the package in app.php

[](#step-2-enable-the-package-in-appphp)

Register the Service in: **config/app.php**. Add the below line inside providers array. One can find the provide array inside **config/app.php**

```
Yeamin\Bitly\BitlyServiceProvider::class,
```

Register the Bitly Facade in: **config/app.php** Add the below line inside aliases array.

```
'Bitly' => Yeamin\Bitly\Facade\Bitly::class,

```

This is a example where the Bitly facades will be added.

```
'aliases' => [

        'App' => Illuminate\Support\Facades\App::class,
        'Artisan' => Illuminate\Support\Facades\Artisan::class,
        'Auth' => Illuminate\Support\Facades\Auth::class,
        ...
        'Bitly' => Yeamin\Bitly\Facade\Bitly::class,
```

### Step 3: Configure Bitly credentials

[](#step-3-configure-bitly-credentials)

Run the following command.

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

```

Add this in you **.env** file. One will need generic access token and enter the token in the place of **your\_secret\_bitly\_access\_token** inside .env You can find the **generic access token** from here [Bitly Access Token](https://bitly.is/accesstoken).

```
BITLY_ACCESS_TOKEN=your_secret_bitly_access_token

```

Usage
-----

[](#usage)

### To Get short URL:

[](#to-get-short-url)

( Do not forget to give http or https in the beginning of your url )

```
$url = app('bitly')->getShortUrl('https://www.google.com/'); // http://bit.ly/nHcn3
```

Or if you want to use facade, add this in your class after namespace declaration:

```
use Bitly;
```

Then you can use it directly by calling `Bitly::` like:

```
$url = Bitly::getShortUrl('https://www.google.com/'); // http://bit.ly/nHcn3
```

### To Expand URL:

[](#to-expand-url)

```
$shortUrl = app('bitly')->getLongUrl('http://bit.ly/nHcn3'); // https://www.google.com/
```

Or if you want to use facade, add this in your class after namespace declaration:

```
use Bitly;
```

Then you can use it directly by calling `Bitly::` like:

```
$url = Bitly::getLongUrl('http://bit.ly/nHcn3'); // https://www.google.com/
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

2252d ago

Major Versions

1.0.5 → 2.0.02020-03-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/1004a29d659b7c1f6636ad936ef8becbd1de1b616298884bc92728a1f4b60afe?d=identicon)[Sayed Yeamin Arafat](/maintainers/Sayed%20Yeamin%20Arafat)

---

Top Contributors

[![SyedArafat](https://avatars.githubusercontent.com/u/30807504?v=4)](https://github.com/SyedArafat "SyedArafat (7 commits)")

### Embed Badge

![Health badge](/badges/yeamin-bitly-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/yeamin-bitly-laravel/health.svg)](https://phpackages.com/packages/yeamin-bitly-laravel)
```

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[grantholle/powerschool-api

A Laravel package to make interacting with PowerSchool less painful.

1715.6k1](/packages/grantholle-powerschool-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
