bluora / laravel-slack
dev-master
2017-07-04 01:13 UTC
Requires
- php: >=7.0.0
- bluora/php-slack: dev-master
Requires (Dev)
- phpmd/phpmd: @stable
- squizlabs/php_codesniffer: ^2.0
This package is not auto-updated.
Last update: 2022-02-01 13:07:41 UTC
README
_____ _ _ __ _ _
/ ____| | | | / _| | | | |
| (___ | | __ _ ___| | __ | |_ ___ _ __ | | __ _ _ __ __ ___ _____| |
\___ \| |/ _` |/ __| |/ / | _/ _ \| '__| | | / _` | '__/ _` \ \ / / _ \ |
____) | | (_| | (__| < | || (_) | | | |___| (_| | | | (_| |\ V / __/ |
|_____/|_|\__,_|\___|_|\_\ |_| \___/|_| |______\__,_|_| \__,_| \_/ \___|_|
为 Laravel 提供 Slack。
此包已由澳大利亚精品开发者 H&H|Digital 适配。访问我们网站 hnh.digital。
安装
通过 composer
$ composer require bluora/laravel-slack dev-master
通过编辑 config/app.php 启用服务提供者
'providers' => [ ... Bluora\LaravelSlack\ServiceProvider::class, ... ];
通过编辑 config/app.php 启用外观
'aliases' => [ ... 'Slack' => Bluora\LaravelSlack\Facade::class, ... ];
然后为每个你想要发送消息的 Slack 团队 创建一个 incoming webhook。你需要 webhook URL 来配置此包。
最后,使用 php artisan vendor:publish
发布配置文件。你可以在 config/slack.php
中找到它。
配置
配置文件包含默认值和占位符。配置至少一个团队和任何你想要更改的默认值。
使用
// Send a message to the default channel Slack::send('Hello world!'); // Send a message to a different channel Slack::to('#accounting')->send('Are we rich yet?'); // Send a private message Slack::to('@username')->send('psst!');
贡献
请参阅 CONTRIBUTING 获取详细信息。
鸣谢
许可证
BSD 2-clause。请参阅 许可证文件 获取更多信息。