mauroziux/laravel-url-shortener 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mauroziux/laravel-url-shortener

最新稳定版本:v2.0.1

Composer 安装命令:

composer require mauroziux/laravel-url-shortener

包简介

Laravel Package for shortening urls with Laravel 10 and 11 support

README 文档

README

Latest Stable Version Total Downloads

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

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

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

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

See config/urlshortener.php

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

统计信息

  • 总下载量: 83
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 15
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-04