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
850
0
Share
Create a Laravel notification via Slack when batch jobs are finished
arm4
March 02, 2019
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
410
Make it happen in realtime with Laravel Echo and Pusher
fromarm4
0
1k
Trying to write a code with Laravel+Vue+TypeScript
fromarm4
0
580
solving frontend issues
fromarm4
1
1.8k
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
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
2.8k
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
1.6k
Road to RubyKaigi: Play Hard(ware)
makicamel
1
550
Programming with a DJ Controller — not vibe coding
m_seki
3
790
【26新卒研修】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
140
PHPでローカル環境用のSSL/TLS証明書を発行することはできるのか? #phpconkagawa
akase244
0
350
サークル参加から学ぶ、小さな事業の回し方
yuzneri
0
130
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.6k
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
210
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
28
19k
実用!Hono RPC2026
yodaka
2
300
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
160
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
920
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
210
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
540
Raft: Consensus for Rubyists
vanstee
141
7.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
210
[SF Ruby Conf 2025] Rails X
palkan
2
1k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
120
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