https://github.com/friendsofthinkphp/think-site-pusher
ThinkPHP 扩展包 网站链接提交
https://github.com/friendsofthinkphp/think-site-pusher
thinkphp thinkphp5 thinkphp6
Last synced: about 17 hours ago
JSON representation
ThinkPHP 扩展包 网站链接提交
- Host: GitHub
- URL: https://github.com/friendsofthinkphp/think-site-pusher
- Owner: friendsofthinkphp
- License: mit
- Created: 2019-10-25T14:28:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-02T00:21:34.000Z (over 5 years ago)
- Last Synced: 2025-09-02T06:18:06.303Z (5 months ago)
- Topics: thinkphp, thinkphp5, thinkphp6
- Language: PHP
- Size: 14.6 KB
- Stars: 13
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# think-site-pusher
ThinkPHP 扩展包 网站链接提交
[](https://packagist.org/packages/xiaodi/think-site-pusher)
[](https://packagist.org/packages/xiaodi/think-site-pusher)
[](//packagist.org/packages/xiaodi/think-site-pusher)
## 安装
```
composer require xiaodi/think-site-pusher
```
## 配置
#### 默认配置
项目根目录 `config/push.php`
#### 临时配置
```php
use EasyPush\Facade\Pusher;
$config = ['site' => 'xxx', 'token' => 'xxx'];
Pusher::baidu($config)->urls($urls);
```
## 使用
#### Facade
```php
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);
```
#### 助手函数
```php
$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);
```