承接 danielebuso/shortener 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

danielebuso/shortener

Composer 安装命令:

composer require danielebuso/shortener

包简介

Laravel 7 local url shortener

README 文档

README

Latest Version on Packagist Build Status Quality Score Total Downloads

Local link shortener for Laravel 7

Installation

You can install the package via composer:

composer require danielebuso/shortener

Publish the migration and migrate

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

Usage

$short_link = Shortener::shorten('https://example.com/my-very-long-link');

$short_link->short_url // Eg. https://myapp.com/l/JedO8TSC

Customize routing

To customize the link routing add the following to your routes and customize as you wish

Route::domain('mylink.com')->group(function () {
    Route::get('{short_link}', 'ShortLinkController@resolve')->name('short_link');
});

// Then in controller
$short_link->short_url // Eg. https://mylink.com/JedO8TSC

Configuration

To customize the config either use the environment variables or publish the configuration file

php artisan vendor:publish --tag=config
Config .env Default Description
link_length SHORTENER_LINK_LENGTH 8 Number of random characters used in link generation

Testing

composer test

Upcoming features

  • Custom validity (nbf, exp)
  • Link analitycs (times opened)
  • Real tests

Security

If you discover any security related issues, please email daniele@kodesire.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-07-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固