在laravel框架中实现缩短应用程序中的URL扩展包推荐:Cuttly
Laravel  /  管理员 发布于 1个月前   61
Cuttly服务是一个Laravel软件包,为 Cuttly API 提供了一个方便的封装。
https://cutt.ly/api-documentation/regular-api
它提供链接缩短、编辑和在 Laravel 应用程序中创建的缩短 URL 的统计功能:
use Slvler\Cuttly\Facades\Cuttly;
Cuttly::short(['short' => 'google.com']);
/*
{
"url": {
"status": 7,
"fullLink": "http://google.com",
"date": "2023-08-07",
"shortLink": "https://cutt.ly/ewdVijlY",
"title": "Google"
}
}
*/
您可以使用 stats() 方法方便地检索缩短 URL 的统计信息:
use Slvler\Cuttly\Facades\Cuttly;
Cuttly::stats(['stats' => 'cutt.ly/ewdVijlY']);
/*
{
"stats": {
"status": 1,
"clicks": 0,
"date": "2023-08-07",
"title": "Google",
"fullLink": "http://google.com",
"shortLink": "https://cutt.ly/ewdVijlY",
"facebook": 0,
"twitter": 0,
"pinterest": 0,
"instagram": 0,
"googlePlus": 0,
"linkedin": 0,
"rest": 0,
"devices": {},
"refs": {},
"bots": "Insufficient subscription level"
}
}
*/
你可以通过查看 API 文档注册并熟悉 Cutt.ly API。
要开始使用源代码,可以在 GitHub 上查看,请看一下链接
https://cutt.ly/api-documentation/regular-api
https://github.com/slvler/laravel-url-shortener
路人 在
php中使用hyperf框架调用讯飞星火大模型实现国内版chatgpt功能示例中评论 教程很详细,如果加个前端chatgpt对话页面就完美了..博主 在
科学上网翻墙之v2rayN-Core客户端免费公益节点使用教程中评论 @ mashrdn 多切换几个节点测试,免费ssr是没那么稳..mashrdn 在
科学上网翻墙之v2rayN-Core客户端免费公益节点使用教程中评论 V2rayn免费节点添加上去了,youtobe无法打开网页,是怎么回事..张伟 在
科学上网翻墙之v2rayN-Core客户端免费公益节点使用教程中评论 3q!有用,不过免费节点隔天就要去git上复制新的导进去..博主 在
科学上网翻墙访问Google , 上外网神器佛跳墙VPN(永久免费)使用流程步骤中评论 该篇教程已不能用了,告知大家,免的老有老铁问我!..
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号