hnhdigital-os / laravel-slack
hnhdigital-os/php-slack 包的 Laravel 集成。
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 auto-updated.
Last update: 2024-09-22 01:56:37 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 团队创建一个入站 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。有关更多信息,请参阅许可证文件。