xiaodi / think-short-url
ThinkPHP ShortUrl Component
v1.0.0
2019-11-14 09:30 UTC
Requires
- guzzlehttp/guzzle: ^6.4
- symfony/css-selector: ^4.3
- symfony/dom-crawler: ^4.2
- topthink/framework: 6.0.*
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.15
- mockery/mockery: ^1.2
- phpunit/phpunit: ^6.2
This package is not auto-updated.
Last update: 2024-11-09 08:50:27 UTC
README
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);