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
870
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
190
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
430
Make it happen in realtime with Laravel Echo and Pusher
fromarm4
0
1.1k
Trying to write a code with Laravel+Vue+TypeScript
fromarm4
0
600
solving frontend issues
fromarm4
1
1.8k
Popular Vue.js UI Frameworks in 2019
fromarm4
2
900
SKDs対象のWeb API設計概論〜Laravelを添えて〜
fromarm4
0
1.4k
Other Decks in Programming
See All in Programming
5分で問診!Composer セキュリティ健康診断
codmoninc
0
860
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.7k
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
750
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
1.1k
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
240
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
470
その節約、円になってますか?
isamumumu
1
680
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
150
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
330
テーブルをDELETEした
yuzneri
0
130
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
140
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.2k
Featured
See All Featured
A Soul's Torment
seathinner
6
3.3k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
820
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
How to Ace a Technical Interview
jacobian
281
24k
Discover your Explorer Soul
emna__ayadi
2
1.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
560
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