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
860
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
180
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
420
Make it happen in realtime with Laravel Echo and Pusher
fromarm4
0
1k
Trying to write a code with Laravel+Vue+TypeScript
fromarm4
0
590
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
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1.1k
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
150
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
310
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.3k
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
580
AI時代の仕事技芸論〜ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ(スクフェス仙台 2026バージョン)
kuranuki
0
610
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
150
技術記事、 専門家としてのプログラマ、 言語化
mizchi
14
7.4k
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
340
初めてのKubernetes 本番運用でハマった話
oku053
0
120
霧の中の代数的エフェクト
funnyycat
1
340
共通化で考えるべきは、実装より公開する型だった
codeegg
0
210
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
187
22k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
290
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
180
Paper Plane
katiecoart
PRO
2
52k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
The untapped power of vector embeddings
frankvandijk
2
1.8k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
970
RailsConf 2023
tenderlove
30
1.5k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.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