goodnesskay/laravel-slack
Composer 安装命令:
composer require goodnesskay/laravel-slack
包简介
A Laravel Package that makes Invitation to Slack Channels seamless
README 文档
README
This package was built for easy integration of automatic Slack invite into your Laravel Project instead of writing codes from scratch or with another programming language. If your web project is built on Laravel and you need to handle Automatic Slack Invite, this package makes that job seamless. Enjoy!!!
Requirement
Installation
To install into your project, run the command below in your terminal.
composer require goodnesskay/laravel-slack
Once the package is done being installed, register the service provider. Open config/app.php and add the following to the providers key.
GoodnessKay\LaravelSlack\LaravelSlackServiceProvider::class
After that, register the Facade in the same config/app.php file:
'aliases' => [
...
'LaravelSlack' => GoodnessKay\LaravelSlack\Facade\LaravelSlack::class,
...
]
Finally, this project requires GuzzleHttp Client. Install it by running this in your terminal
composer require guzzlehttp/guzzle
Configure
Publish the config file LaravelSlack.php to config folder,
the Views folder of the package named Slack to the resources/views folder and LaravelSlackController.php to App\Http\Controller folder
php artisan vendor:publish --provider="GoodnessKay\LaravelSlack\LaravelSlackServiceProvider"
How it Works
After following all the information stated above, what next to do are:
A) Copy the code below to your .env file and make changes to the values.
SLACK_TEAM_NAME="Codebag Team"
TEAM_DESCRIPTION="Brief Description of your team. This will be seen publicly"
SLACK_TEAM_URL="https://codebag-team-test.slack.com/"
SLACK_API_TOKEN="apap-2526258373-71328384096-187220289412-01c2c6637bb0d474f39f24e0a79d6e072"
SLACK_TEAM_EMAIL="gtkbrain@gmail.com"
Note: Make sure you include the quotation mark.
To get your Slack Api Token, check https://api.slack.com/custom-integrations/legacy-tokens and go to Legacy Token Generator to issue the token.
B) Copy the code below into your route file routes/web.php
Route::get('/slack',[
'uses'=>'LaravelSlackController@slackPage',
'as'=>'slack'
]);
Route::post('/slack',[
'uses'=>'LaravelSlackController@sendSlackInvite',
'as'=>'slack'
]);
C) Use php artisan serve and check your slack invite page on http://locahost:8000/slack
Contribute
You can fork this package, contribute and submit a pull request. I will really love it.
You want to appreciate me?
You can appreciate me by starring this repository and follow me on Github , twitter and subscribe to my Youtube Channel!
I love you too.
Goodness Kayode | Pusher of Codes
License
MIT License (MIT).
goodnesskay/laravel-slack 适用场景与选型建议
goodnesskay/laravel-slack 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 71 次下载、GitHub Stars 达 31, 最近一次更新时间为 2017 年 05 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「packages」 「slack」 「slack api」 「Automatic Invite」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 goodnesskay/laravel-slack 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 goodnesskay/laravel-slack 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 goodnesskay/laravel-slack 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Highly Opinionated Symfony3/4 Deployer Recipe
This bundle provides integration with the Slack API library, allowing you to interact with the Slack API from within your Symfony projects
a package for collections of custom toolkit
This composer plugin enables installation of GravityForms WordPress plugin and its addons.
a simple toolkit for social networks
Wrapper for Slack Web API
统计信息
- 总下载量: 71
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 31
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-05-25
