Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Create a Laravel notification via Slack when ba...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
arm4
March 02, 2019
Programming
0
810
Create a Laravel notification via Slack when batch jobs are finished
arm4
March 02, 2019
Tweet
Share
More Decks by arm4
See All by arm4
Google Data Studio 101
fromarm4
0
160
5 Points Of Customizing Vuetify
fromarm4
4
1.3k
about abstract component design using slots of Vue.js
fromarm4
4
1.5k
laravel_lt_party_with_mokumoku_3
fromarm4
0
400
Make it happen in realtime with Laravel Echo and Pusher
fromarm4
0
1k
Trying to write a code with Laravel+Vue+TypeScript
fromarm4
0
560
solving frontend issues
fromarm4
1
1.7k
Popular Vue.js UI Frameworks in 2019
fromarm4
2
880
SKDs対象のWeb API設計概論〜Laravelを添えて〜
fromarm4
0
1.4k
Other Decks in Programming
See All in Programming
SourceGeneratorのススメ
htkym
0
160
AgentCoreとHuman in the Loop
har1101
5
200
CSC307 Lecture 07
javiergs
PRO
0
520
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.3k
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
400
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
660
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
260
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
270
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
500
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
590
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
6k
Featured
See All Featured
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
100
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
My Coaching Mixtape
mlcsv
0
41
BBQ
matthewcrist
89
10k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
87
Tell your own story through comics
letsgokoyo
1
800
Building the Perfect Custom Keyboard
takai
2
680
Mind Mapping
helmedeiros
PRO
0
55
Transcript
Laravelの バッチ処理終了を Slackでお知らせ する @plumsa
自己紹介 株式会社プラムザ Tech Lead ハトヨウコ 公式Twitter ララ・ベル子さんの中の人 @plumsa 2
動機 関連するテーブルが 22個もある テストデータをしょっちゅう生成する 3
Seeder流して 他の作業しよう〜 4
5 20分ほどかかるの で、ほっとくと うっかり忘れてしまう。
“ そうだ! Slackで通知されたらいいね 6
開発環境 ◦ Laravel 5.7.20 ◦ PHP 7.2.7 7
手順 ◦ Guzzleをインストール composer require guzzlehttp/guzzle ※Laravel 5.8の場合 composer require
laravel/slack-notification-channel ◦ Notificationクラスの作成 php artisan make:notification SlackPosted ◦ Notificationクラス(SlackPosted)の実装 ◦ Slack通知サービスクラスを作成&実装 ◦ Seederを作成&実装 php artisan make:seeder SampleSeeder 8
Notificationクラス(SlackPosted)の実装 9 Slackに通知をする汎用的なNotificationクラスを 実装する。
Slack通知サービスクラスを作成&実装 10 Seeder通知サービスクラス (SlackSeederNotificationService)を実装する
Seederを作成&実装 11 Seeder通知サービスクラスにSeeder名を渡して 完了の通知を送ってもらう。
できた! 12
Thanks! ご清聴ありがとうございました! 13