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
880
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
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
0
130
30年振りにコンパイラの定数整数除算を改善した
herumi
9
4.4k
高専キャリア LT 発表内容
crysta1221
6
5.4k
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
530
20260828_品質と開発生産性を両立させる、AI時代のE2Eテストの考え方
magicpod
0
100
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
1
220
業務時間外もAIに働いてもらう話
colorful12
3
9.9k
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
460
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
140
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.6k
MySQLとPostgreSQLって何が違うの?
akagami
PRO
0
160
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
290
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Google's AI Overviews - The New Search
badams
0
1.6k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
460
Skip the Path - Find Your Career Trail
mkilby
1
210
The Pragmatic Product Professional
lauravandoore
37
7.4k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
430
Faster Mobile Websites
deanohume
310
32k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
270
Done Done
chrislema
186
16k
The Spectacular Lies of Maps
axbom
PRO
1
970
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