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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
arm4
March 02, 2019
Programming
840
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
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
事業会社でのセキュリティ長期インターンについて
masachikaura
0
180
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
1.3k
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
160
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
1
230
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
280
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
910
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
280
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.1k
ロボットのための工場に灯りは要らない
watany
12
3.3k
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
330
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.5k
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
420
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
72
12k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Become a Pro
speakerdeck
PRO
31
5.9k
Paper Plane (Part 1)
katiecoart
PRO
0
6.3k
The SEO Collaboration Effect
kristinabergwall1
0
410
Test your architecture with Archunit
thirion
1
2.2k
Side Projects
sachag
455
43k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
81
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
340
Game over? The fight for quality and originality in the time of robots
wayneb77
1
150
Six Lessons from altMBA
skipperchong
29
4.2k
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