定制 arietimmerman/laravel-url-shortener 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

arietimmerman/laravel-url-shortener

最新稳定版本:v0.1.8

Composer 安装命令:

composer require arietimmerman/laravel-url-shortener

包简介

Laravel Package for shortening urls

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 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 < 5.5

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

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

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

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 

统计信息

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

GitHub 信息

  • Stars: 28
  • Watchers: 3
  • Forks: 15
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固