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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
890
SKDs対象のWeb API設計概論〜Laravelを添えて〜
fromarm4
0
1.4k
Other Decks in Programming
See All in Programming
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
110
JavaDoc 再入門
nagise
1
370
C# and C++ Interoperability - cho-dotnetnew
harukasao
0
270
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
360
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
150
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
120
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
260
OSもどきOS
arkw
0
570
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
790
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
200
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
560
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
120
Featured
See All Featured
BBQ
matthewcrist
89
10k
Designing Experiences People Love
moore
143
24k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
290
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
390
How to Ace a Technical Interview
jacobian
281
24k
WENDY [Excerpt]
tessaabrams
11
38k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
200
Designing for Timeless Needs
cassininazir
1
260
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Between Models and Reality
mayunak
4
340
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
170
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