Skip to content

friendsofthinkphp/think-site-pusher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

think-site-pusher

ThinkPHP 扩展包 网站链接提交

Latest Stable Version Total Downloads Latest Unstable Version

安装

composer require xiaodi/think-site-pusher

配置

默认配置

项目根目录 config/push.php

临时配置

use EasyPush\Facade\Pusher;

$config = ['site' => 'xxx', 'token' => 'xxx'];
Pusher::baidu($config)->urls($urls);

使用

Facade

use EasyPush\Facade\Pusher;

$urls = [
  'https://www.xiaodim.com/index.html',
  'https://www.xiaodim.com/2019/10/25/thinkphp6-rpc-tutorial/'
]

// 推送链接
Pusher::baidu()->push($urls);

// 更新链接
Pusher::baidu()->update($urls);

// 删除链接
Pusher::baidu()->delete($urls);

助手函数

$urls = [
  'https://www.xiaodim.com/index.html',
  'https://www.xiaodim.com/2019/10/25/thinkphp6-rpc-tutorial/'
]

// 推送链接
app('pusher')->baidu()->push($url);

// 更新链接
app('pusher')->baidu()->update($urls);

// 删除链接
app('pusher')->baidu()->delete($urls);