PHPackages                             sunxyw/unify-shorten - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sunxyw/unify-shorten

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sunxyw/unify-shorten
====================

This is my package unify-shorten

v1.1.0(3y ago)22[4 PRs](https://github.com/sunxyw/unify-shorten/pulls)MITPHPPHP ^8.1

Since Oct 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/sunxyw/unify-shorten)[ Packagist](https://packagist.org/packages/sunxyw/unify-shorten)[ Docs](https://github.com/sunxyw/unify-shorten)[ RSS](/packages/sunxyw-unify-shorten/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (13)Versions (7)Used By (0)

Unify Shorten - Make all URL Shorteners together
================================================

[](#unify-shorten---make-all-url-shorteners-together)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9bcda15672ec750b30485869550671cdaa89b84dc37f54609fc87375a1239dbd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73756e7879772f756e6966792d73686f7274656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sunxyw/unify-shorten)[![GitHub Tests Action Status](https://camo.githubusercontent.com/680305866bdb277d414c27222466159bcdf562e6153d13d586895932ba5b04e7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f73756e7879772f756e6966792d73686f7274656e2f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/sunxyw/unify-shorten/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/7928ab53d1b21dc334dadc5883cbd88ccb7231f7fec34d9d191c133e2946de7a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f73756e7879772f756e6966792d73686f7274656e2f466978253230504850253230636f64652532307374796c652532306973737565733f6c6162656c3d636f64652532307374796c65)](https://github.com/sunxyw/unify-shorten/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/1006543ce97ca08237361e94b73cc837bcdfd18aa7f5658bad16f6a4e668b33f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73756e7879772f756e6966792d73686f7274656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sunxyw/unify-shorten)

This is a package that helps you quickly access various short link services, which you can use to make your app support short links provided by different short link services. From full disclosure, to requiring registration, and even paid services.

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

[](#installation)

You can install the package via composer:

```
composer require sunxyw/unify-shorten
```

You can publish the config file with (it should be published automatically):

```
php artisan vendor:publish --tag="unify-shorten-config"
```

Usage
-----

[](#usage)

```
// using Facade
use Sunxyw\Shorten\Facades\Shorten;
Shorten::shorten('AWESOME URL HERE'); // using default provider
Shorten::provider('cuttly')->shorten('AWESOME URL HERE WITH CUTTLY'); // using cuttly provider

// using helper function
shorten('AWESOME URL HERE'); // using default provider

// using Shorten class
use Sunxyw\Shorten\Shorten;
app(Shorten::class)->shorten('AWESOME URL HERE'); // using default provider
app(Shorten::class)->provider('cuttly')->shorten('AWESOME URL HERE WITH CUTTLY'); // using cuttly provider
app(Shorten::class)->gotiny->shorten('AWESOME URL HERE WITH GOTINY'); // using gotiny provider (using magic property)
```

All the methods above will return the shortened URL.

Supported Providers
-------------------

[](#supported-providers)

APIAuthHTTPSCORS[1pt](https://github.com/1pt-co/api/blob/main/README.md)NoYesYes[CleanURI](https://cleanuri.com/docs)NoYesYes[Cutt.ly](https://cutt.ly/api-documentation/cuttly-links-api)`apiKey`YesUnknown[GoTiny](https://github.com/robvanbakel/gotiny-api)NoYesYes[Firebase](https://firebase.google.com/docs/dynamic-links)`apiKey`YesYes> If you have more providers that you would like supported, please contact me in Issues. For paid providers, it would be even better if you could provide test credentials.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [sunxyw](https://github.com/sunxyw)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 64.3% 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 ~30 days

Total

2

Last Release

1326d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0074b4d8ef244d2d516e67fe7949e287b37eeee02d4adfa0da953077bf7e0121?d=identicon)[sunxyw](/maintainers/sunxyw)

---

Top Contributors

[![sunxyw](https://avatars.githubusercontent.com/u/31698606?v=4)](https://github.com/sunxyw "sunxyw (18 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

---

Tags

laravelphpshortenerunifyurlurl-shortenerlaravelsunxywunify-shorten

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/sunxyw-unify-shorten/health.svg)

```
[![Health](https://phpackages.com/badges/sunxyw-unify-shorten/health.svg)](https://phpackages.com/packages/sunxyw-unify-shorten)
```

###  Alternatives

[nativephp/mobile

NativePHP for Mobile

1.1k75.1k91](/packages/nativephp-mobile)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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