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
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
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
CSC307 Lecture 15
javiergs
PRO
0
270
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
810
AI活用のコスパを最大化する方法
ochtum
0
330
Nuxt Server Components
wattanx
0
120
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.6k
SourceGeneratorのマーカー属性問題について
htkym
0
220
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.4k
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
190
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
560
Claude Codeログ基盤の構築
giginet
PRO
7
3.6k
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
620
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
160
Featured
See All Featured
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
240
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
410
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
200
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
91
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
86
Fireside Chat
paigeccino
42
3.8k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
160
Google's AI Overviews - The New Search
badams
0
950
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
460
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
390
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