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

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

danielebuso/shortener
=====================

Laravel 7 local url shortener

1.0.3(5y ago)02.8kMITPHPPHP ^7.1

Since Jul 6Pushed 5y ago1 watchersCompare

[ Source](https://github.com/danielebuso/shortener)[ Packagist](https://packagist.org/packages/danielebuso/shortener)[ Docs](https://github.com/danielebuso/laravel-shortener)[ RSS](/packages/danielebuso-shortener/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

Laravel Link Shortener
======================

[](#laravel-link-shortener)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7f9957962e3f2b3ae9e6a36139810785484a7c81e60a5df39dfbc28f7aa9f69a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64616e69656c656275736f2f73686f7274656e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/danielebuso/shortener)[![Build Status](https://camo.githubusercontent.com/115099980cc3e33166876cc8200bba958304d5405f5a77235f9790c40b551b87/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f64616e69656c656275736f2f73686f7274656e65722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/danielebuso/shortener)[![Quality Score](https://camo.githubusercontent.com/0e4c22e59824311d1ac78f3cba4a4c17fa934603886b057c465bb332696f9152/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f64616e69656c656275736f2f73686f7274656e65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/danielebuso/shortener)[![Total Downloads](https://camo.githubusercontent.com/caa011edbdca3f18b0a17c7c8bdb8a45c3a3c5e3b0e8fb950248a7d5688dce92/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64616e69656c656275736f2f73686f7274656e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/danielebuso/shortener)

Local link shortener for Laravel 7

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

[](#installation)

You can install the package via composer:

```
composer require danielebuso/shortener
```

Publish the migration and migrate

```
php artisan vendor:publish --tag=migrations
php artisan migrate
```

Usage
-----

[](#usage)

```
$short_link = Shortener::shorten('https://example.com/my-very-long-link');

$short_link->short_url // Eg. https://myapp.com/l/JedO8TSC
```

Customize routing
-----------------

[](#customize-routing)

To customize the link routing add the following to your routes and customize as you wish

```
Route::domain('mylink.com')->group(function () {
    Route::get('{short_link}', 'ShortLinkController@resolve')->name('short_link');
});

// Then in controller
$short_link->short_url // Eg. https://mylink.com/JedO8TSC
```

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

[](#configuration)

To customize the config either use the environment variables or publish the configuration file

```
php artisan vendor:publish --tag=config
```

Config.envDefaultDescriptionlink\_lengthSHORTENER\_LINK\_LENGTH8Number of random characters used in link generation### Testing

[](#testing)

```
composer test
```

### Upcoming features

[](#upcoming-features)

- Custom validity (nbf, exp)
- Link analitycs (times opened)
- Real tests

### Security

[](#security)

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

Credits
-------

[](#credits)

- [Daniele Buso](https://github.com/danielebuso)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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 ~8 days

Total

4

Last Release

2115d ago

### Community

Maintainers

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

---

Top Contributors

[![danielebuso](https://avatars.githubusercontent.com/u/6517317?v=4)](https://github.com/danielebuso "danielebuso (21 commits)")

---

Tags

laravelshortenerdanielebuso

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[laracrafts/laravel-url-shortener

Powerful URL shortening tools in Laravel

97110.7k](/packages/laracrafts-laravel-url-shortener)[gallib/laravel-short-url

A Laravel package to shorten urls

16516.4k](/packages/gallib-laravel-short-url)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

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