Skip to content

friendsofthinkphp/think-short-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

think-short-url

Build Status

ThinkPHP 短地址生成 扩展包

安装

$ composer require xiaodi/think-short-url:dev-master

百度

创建

use ShortUrl\Facade\ShortUrl;

ShortUrl::make('baidu')->create('https://www.baidu.com');

还原

use ShortUrl\Facade\ShortUrl;

ShortUrl::make('baidu')->query('https://dwz.cn/JCRnHXWE');

删除

use ShortUrl\Facade\ShortUrl;

ShortUrl::make('baidu')->delete('JCRnHXWE');

新浪

创建

use ShortUrl\Facade\ShortUrl;

ShortUrl::make('sina')->create('https://www.baidu.com');

快捷助手

// 生成百度短链
shorturl_baidu($url);

// 生成新浪短链
shorturl_sina($url);