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

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

mauroziux/laravel-url-shortener
===============================

Laravel Package for shortening urls with Laravel 10 and 11 support

v2.0.1(12mo ago)083MITPHPPHP ^8.1CI passing

Since Mar 20Pushed 12mo agoCompare

[ Source](https://github.com/mauroziux/laravel-url-shortener)[ Packagist](https://packagist.org/packages/mauroziux/laravel-url-shortener)[ Docs](https://github.com/mauroziux/laravel-url-shortener)[ RSS](/packages/mauroziux-laravel-url-shortener/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (8)Versions (15)Used By (0)

[![](https://github.com/mauroziux/laravel-url-shortener/workflows/CI/badge.svg)](https://github.com/mauroziux/laravel-url-shortener/workflows/CI/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/a3c1f4e0cce30dc92e2dafca327359ae70e9f198b66be1c18ee9d04e23ddbd07/68747470733a2f2f706f7365722e707567782e6f72672f6d6175726f7a6975782f6c61726176656c2d75726c2d73686f7274656e65722f762f737461626c65)](https://packagist.org/packages/mauroziux/laravel-url-shortener)[![Total Downloads](https://camo.githubusercontent.com/9962cdd4ac9f7b87aedb8092b8f2c042f88cf2f94737d7af953e26c42e250a3f/68747470733a2f2f706f7365722e707567782e6f72672f6d6175726f7a6975782f6c61726176656c2d75726c2d73686f7274656e65722f646f776e6c6f616473)](https://packagist.org/packages/mauroziux/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 9.0, 10.0, and 11.0.

```
composer require mauroziux/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
```

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

[](#requirements)

- PHP 8.1 or higher
- Laravel 9.0, 10.0, or 11.0

Optional
--------

[](#optional)

Publish the configuration and the view.

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

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

```
protected $listen = [
	'Mauroziux\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

38

—

LowBetter than 83% of packages

Maintenance50

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 88.2% 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 ~149 days

Recently: every ~0 days

Total

14

Last Release

362d ago

Major Versions

v0.3.0 → v1.0.02025-07-04

v1.0.0 → v2.0.02025-07-04

PHP version history (3 changes)v0.1.0PHP ^7.0

v0.1.5PHP ^7.0|^8.0

v0.2.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/762047d1e8e56f2cfe81ff251156ffe1cf44d4730e01036cd596842a6a420935?d=identicon)[mauroziux](/maintainers/mauroziux)

---

Top Contributors

[![arietimmerman](https://avatars.githubusercontent.com/u/2026675?v=4)](https://github.com/arietimmerman "arietimmerman (45 commits)")[![mauroziux](https://avatars.githubusercontent.com/u/7992157?v=4)](https://github.com/mauroziux "mauroziux (6 commits)")

---

Tags

urllaraveltrackingbitlyshortenerredirect

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k90.5k1](/packages/mike-bronner-laravel-model-caching)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

198321.1k](/packages/fumeapp-modeltyper)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)

PHPackages © 2026

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