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
arm4
March 02, 2019
Programming
0
830
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
170
5 Points Of Customizing Vuetify
fromarm4
4
1.4k
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
570
solving frontend issues
fromarm4
1
1.7k
Popular Vue.js UI Frameworks in 2019
fromarm4
2
890
SKDs対象のWeb API設計概論〜Laravelを添えて〜
fromarm4
0
1.4k
Other Decks in Programming
See All in Programming
Fundamentals of Software Engineering In the Age of AI
therealdanvega
1
230
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
140
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
4
380
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
680
Codex の「自走力」を高める
yorifuji
0
1.1k
AIプロダクト時代のQAエンジニアに求められること
imtnd
2
760
SourceGeneratorのマーカー属性問題について
htkym
0
180
Windows on Ryzen and I
seosoft
0
220
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
250
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
110
今、アーキテクトとして 品質保証にどう関わるか
nealle
0
210
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.5k
Featured
See All Featured
Information Architects: The Missing Link in Design Systems
soysaucechin
0
820
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.5k
A Soul's Torment
seathinner
5
2.4k
Building Adaptive Systems
keathley
44
2.9k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
140
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
Mind Mapping
helmedeiros
PRO
1
110
Designing for Performance
lara
611
70k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
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