承接 magarrent/laravel-url-shortener 相关项目开发

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

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

magarrent/laravel-url-shortener

最新稳定版本:1.0.5

Composer 安装命令:

composer require magarrent/laravel-url-shortener

包简介

Simpler Url Shortener for Laravel

关键字:

README 文档

README

Laravel Url Shortener

Software License Package Size

"Buy Me A Coffee"

Install

composer require magarrent/laravel-url-shortener

Run migrations:

php artisan migrate

Configuration

If you want to configurate some package parameters, run vendor publish:

php artisan vendor:publish --provider="Magarrent\LaravelUrlShortener\LaravelUrlShortenerServiceProvider"

Change the Key Url length in the url-shortener.php config file:

<?php

return [
    'url_key_length' => 6, // http://test.test/X-random-key-length
];

Usage

Import the UrlShortener in your php file.

use Magarrent\LaravelUrlShortener\Models\UrlShortener;

Then you can use the Url shortener package to redirect internal and external links.

UrlShortener::generateShortUrl("https://www.kodio.tech")

UrlShortener::generateShortUrl("/my-next/local/page")

Ex. Redirection:

https://your.url/H8g9Jx => https://www.kodio.tech

You only have to send the Url To param to the UrlShortener model:

public  static  function  generateShortUrl(String $toUrl):  String

Roadmap

  • Ask me for more features! You can buy me a coffe too :)

Changelog

1.0.4

  • Added support for Laravel 9
  • Fixed installation problem with migrations

1.0.2

  • Add getOriginalUrlFromKey function to model
  • Added configuration for Url key length

1.0

  • First version

Contributing

Please see CONTRIBUTING for details.

Credits

Security

If you discover any security-related issues, please email magarrent@gmail.com instead of using the issue tracker.

License

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

统计信息

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

GitHub 信息

  • Stars: 55
  • Watchers: 3
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-08-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固