PHPackages                             shortener/shorty - 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. shortener/shorty

AbandonedArchivedLibrary[API Development](/categories/api)

shortener/shorty
================

Google Url Shortener API Package for Laravel 5.1

2.1(8y ago)0112MITPHPPHP &gt;=5.3.0

Since Nov 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/wardanavagoff/shorty)[ Packagist](https://packagist.org/packages/shortener/shorty)[ Docs](https://github.com/mbarwick83/shorty)[ RSS](/packages/shortener-shorty/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (10)Used By (0)

Shorty
======

[](#shorty)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ab5d0aae4b70083f063e4da2543626db5d255c4aaf5e50ae262b8d53f937b024/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6261727769636b38332f73686f7274792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mbarwick83/shorty)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/b8187b6a3ea9620c02006e103ffb948bf780f61d6675311081ad39f952bac2b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6261727769636b38332f73686f7274792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mbarwick83/shorty)

Google Url Shortener API Package for Laravel 5.\*. Library to shorten URLs, expand URLs, and get stats for shortened URLs. e.g. **goo.gl/XXXXX**

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

[](#installation)

To install, run the following in your project directory

```
$ composer require mbarwick83/shorty
```

Then in `config/app.php` add the following to the `providers` array:

```
Mbarwick83\Shorty\ShortyServiceProvider::class

```

Also in `config/app.php`, add the Facade class to the `aliases` array:

```
'Shorty'    => Mbarwick83\Shorty\Facades\Shorty::class

```

Configuration
-------------

[](#configuration)

To publish Shorty's configuration file, run the following `vendor:publish` command:

```
php artisan vendor:publish --provider="Mbarwick83\Shorty\ShortyServiceProvider"

```

This will create a shorty.php in your config directory. Here you **must** enter your Google Shortener URL API Key. Get an API key at [https://developers.google.com/url-shortener/v1/getting\_started#APIKey](https://developers.google.com/url-shortener/v1/getting_started#APIKey).

Usage
-----

[](#usage)

**Be sure to include the namespace for the class wherever you plan to use this library**

```
use Mbarwick83\Shorty\Facades\Shorty;

```

\#####To shorten a URL:

```
$url = "http://google.com";

Shorty::shorten($url);

// returns, http://goo.gl/XXXXX
```

\#####To expand a shortened URL:

```
$url = "http://goo.gl/XXXXX";

Shorty::expand($url);

// returns, http://google.com
```

\#####To get stats on shortened URL:

```
$url = "http://goo.gl/XXXXX";

Shorty::stats($url);
```

*If successful, stats response will return:*

```
{
 "kind": "urlshortener#url",
 "id": "http://goo.gl/fbsS",
 "longUrl": "http://www.google.com/",
 "status": "OK",
 "created": "2009-12-13T07:22:55.000+00:00",
 "analytics": {
  "allTime": {
   "shortUrlClicks": "3227",
   "longUrlClicks": "9358",
   "referrers": [ { "count": "2160", "id": "Unknown/empty" } /* , ... */ ],
   "countries": [ { "count": "1022", "id": "US" } /* , ... */ ],
   "browsers": [ { "count": "1025", "id": "Firefox" } /* , ... */ ],
   "platforms": [ { "count": "2278", "id": "Windows" } /* , ... */ ]
  },
  "month": { /* ... */ },
  "week": { /* ... */ },
  "day": { /* ... */ },
  "twoHours": { /* ... */ }
 }
}

```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email :author\_email instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 74.1% 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 ~103 days

Recently: every ~119 days

Total

9

Last Release

2994d ago

Major Versions

1.0.6 → 2.02017-11-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/f326b41680b52fbe6c84abc7dc37208f2919b3269896074c73b4a8b8d40f7b75?d=identicon)[wardan](/maintainers/wardan)

---

Top Contributors

[![wutmikee](https://avatars.githubusercontent.com/u/330011?v=4)](https://github.com/wutmikee "wutmikee (20 commits)")[![gabfr](https://avatars.githubusercontent.com/u/1237163?v=4)](https://github.com/gabfr "gabfr (4 commits)")[![wardanavagoff](https://avatars.githubusercontent.com/u/7859532?v=4)](https://github.com/wardanavagoff "wardanavagoff (3 commits)")

---

Tags

urlapilaravelgoogleshortener

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shortener-shorty/health.svg)

```
[![Health](https://phpackages.com/badges/shortener-shorty/health.svg)](https://phpackages.com/packages/shortener-shorty)
```

###  Alternatives

[mbarwick83/shorty

Google Url Shortener API Package for Laravel 5.1

31204.9k](/packages/mbarwick83-shorty)[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[hosseinhezami/laravel-gemini

A production-ready Laravel package to integrate with the Google Gemini API. Supports text, image, video, audio, long-context, structured output, files, caching, function-calling and understanding capabilities.

14010.8k1](/packages/hosseinhezami-laravel-gemini)[gemini-api-php/laravel

Gemini API client for Laravel

8915.7k](/packages/gemini-api-php-laravel)[specialtactics/l5-api

Dependencies for the Laravel API Boilerplate package

3672.8k2](/packages/specialtactics-l5-api)

PHPackages © 2026

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