gallib/laravel-short-url 问题修复 & 功能扩展

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

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

gallib/laravel-short-url

最新稳定版本:1.9.0

Composer 安装命令:

composer require gallib/laravel-short-url

包简介

A Laravel package to shorten urls

README 文档

README

Laravel Short URL logo

Laravel Short Url Build Status StyleCI

Laravel Short Url is a package allowing you to shorten urls.

Installation

With composer

composer require gallib/laravel-short-url

then run

php artisan vendor:publish --provider="Gallib\ShortUrl\ShortUrlServiceProvider"
php artisan migrate

finally, paste ShortUrl::routes(); at the end of routes/web.php

Configuration

Laravel Short Url configuration file can be found on config/shorturl.php

  • blacklist : Allows to blacklist urls. Keywords can be either an url, a keyword or an extension

Advanced configuration

Instead of adding ShortUrl::routes(); you can call three separates methods:

  • ShortUrl::createRoutes(); to shorten urls
  • ShortUrl::manageRoutes(); to manage urls
  • ShortUrl::redirectRoute(); to redirect to the url

this allows you to add middlewares or prefix routes.

Migration Customization

If you are not going to use Short Url's default migrations, you should call the ShortUrl::ignoreMigrations(); method in the register method of your AppServiceProvider. You may export the default migrations using

php artisan vendor:publish --tag=shorturl-migrations

Nice!

Laravel short url is now set up on your homepage.

Credits

统计信息

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

GitHub 信息

  • Stars: 166
  • Watchers: 5
  • Forks: 37
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-23