承接 tiagomichaelsousa/slack-laravel 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tiagomichaelsousa/slack-laravel

最新稳定版本:v0.2.0

Composer 安装命令:

composer require tiagomichaelsousa/slack-laravel

包简介

A slack sdk for laravel

README 文档

README

Slack Laravel

GitHub Workflow Status (main) Total Downloads Latest Version License

Slack Laravel is a non-official PHP API package that allows you to interact with the Slack API ⚡️

This package is still under development. There may have methods that are still not implemented.

Get Started

The official documentation for the Slack Client will be available soon. 👀

Until there you can still explore the SDK development experience with the users(), conversations() and reminders() methods 🚀

Requires PHP 8.1+

First, install Slack Laravel via the Composer package manager:

composer require tiagomichaelsousa/slack-laravel

Next, publish the configuration file:

php artisan vendor:publish --provider="Slack\Laravel\ServiceProvider"

This will create a config/slack.php configuration file in your project, which you can modify to your needs using environment variables:

SLACK_TOKEN=xoxb-...

Finally, you may use the Slack facade to access the Slack API:

use Slack\Laravel\Facades\Slack;

$conversations = Slack::conversations()->create('foo');

echo $conversations->channel->name;

Usage

For usage examples, take a look at the tiagomichaelsousa/slack-client repository.

Testing

The Slack facade provides a fake() method that allows you to fake the API responses.

All responses are having a fake() method that allows you to easily create a response object by only providing the parameters relevant for your test case.

use Slack\Laravel\Facades\Slack;
use Slack\Responses\Conversation\CreateConversationResponse;

Slack::fake([
    CreateConversationResponse::fake([
        'channel' => [
            'name' => 'foo',
        ],
    ]);
]);

$conversations = Slack::conversations()->create('foo');

expect($conversations->channel)->name->toBe('foo');

The official documentation for the Slack Client for Laravel will be available soon. 👀

Slack Client for Laravel is an open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-29