PHPackages                             stucchi/laravel-url-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. stucchi/laravel-url-shortener

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

stucchi/laravel-url-shortener
=============================

Laravel Package for shortening urls

v1.0.9(3y ago)08231MITPHPPHP ^7.0|^8.0

Since Apr 30Pushed 1y agoCompare

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

READMEChangelogDependencies (8)Versions (4)Used By (0)

[![](https://github.com/arietimmerman/laravel-url-shortener/workflows/CI/badge.svg)](https://github.com/arietimmerman/laravel-url-shortener/workflows/CI/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/49684391e064f30cfbb7dfe1a4c2cd9add1f895a6b105620895bb41517353dcd/68747470733a2f2f706f7365722e707567782e6f72672f6172696574696d6d65726d616e2f6c61726176656c2d75726c2d73686f7274656e65722f762f737461626c65)](https://packagist.org/packages/arietimmerman/laravel-url-shortener)[![Total Downloads](https://camo.githubusercontent.com/5e50fd04be27b2cf137bafb8528116dfefb04bee54a961181c51b79b71fae3c1/68747470733a2f2f706f7365722e707567782e6f72672f6172696574696d6d65726d616e2f6c61726176656c2d75726c2d73686f7274656e65722f646f776e6c6f616473)](https://packagist.org/packages/arietimmerman/laravel-url-shortener)

A minimal Laravel package for shortening URLs. Apart for creating short URLs - like bitly - it also supported updating URL redirects and tracking URL clicks.

Laravel URL Shortener
=====================

[](#laravel-url-shortener)

Install the package. It supports Laravel 5.5 and up (including 7.0 and up).

```
composer require arietimmerman/laravel-url-shortener
php artisan migrate

```

And start shortening URLs

```
(string)URLShortener::shorten("http://www.example.com");
```

Or

```
php artisan url:shorten http://www.example.com
```

Usage for Laravel &lt; 5.5
--------------------------

[](#usage-for-laravel--55)

Add the *service provider* in your `config/app.php`.

```
'providers' => [ /* [..] */ \ArieTimmerman\Laravel\URLShortener\ServiceProvider::class /* [..] */ ];
```

Optional
--------

[](#optional)

Publish the configuration and the view.

```
php artisan vendor:publish --provider="ArieTimmerman\Laravel\URLShortener\ServiceProvider"
```

Optionally, register for URLVisit events in your `EventServiceProvider`.

```
protected $listen = [
	'ArieTimmerman\Laravel\URLShortener\Events\URLVisit' => [
		'App\Listener\YourListener',
	]
];
```

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

[](#configuration)

See `config/urlshortener.php`

Docker
------

[](#docker)

Build and start the docker container.

```
docker-compose build
docker-compose up

```

Now shorten an URL like this

```
docker-compose exec laravel-url-shortener php artisan url:shorten https://www.example.com

```

Check out the redirect

```
curl -v http://localhost:18123/code

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.7% 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 ~304 days

Total

3

Last Release

507d ago

Major Versions

v0.1.9 → v1.0.92023-04-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/9b54135d081d973809e68c8eb8773da1da56e2c529fade80e713f41c6b7a481e?d=identicon)[lucastucchi](/maintainers/lucastucchi)

---

Top Contributors

[![arietimmerman](https://avatars.githubusercontent.com/u/2026675?v=4)](https://github.com/arietimmerman "arietimmerman (45 commits)")[![stucchi](https://avatars.githubusercontent.com/u/3639626?v=4)](https://github.com/stucchi "stucchi (2 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/stucchi-laravel-url-shortener/health.svg)

```
[![Health](https://phpackages.com/badges/stucchi-laravel-url-shortener/health.svg)](https://phpackages.com/packages/stucchi-laravel-url-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)[orchestra/canvas

Code Generators for Laravel Applications and Packages

20917.2M158](/packages/orchestra-canvas)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[zonneplan/laravel-module-loader

Module loader for Laravel

24118.4k](/packages/zonneplan-laravel-module-loader)

PHPackages © 2026

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