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
850
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
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
580
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
Claspは野良GASの夢をみるか
takter00
0
140
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.2k
Oxlintはいかにしてtsgolintのlint ruleを呼び出しているのか
syumai
2
1k
TSKaigi 2026 TypeScriptバックエンドのオブザーバビリティ戦略 — Datadog × NestJSの実践
taiseiyamamotoan
1
210
AIエージェントと協働するCLI開発 — BunとOpenClawで学んだこと
yoshikouki
1
230
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
390
LLM Plugin for Node-REDの利用方法と開発について
404background
0
150
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
2.3k
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
140
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
490
初めてのRubyKaigiはこう見えた
jellyfish700
0
370
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
3
1.3k
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
698
190k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Designing for Timeless Needs
cassininazir
1
240
Side Projects
sachag
455
43k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
850
Un-Boring Meetings
codingconduct
0
300
What's in a price? How to price your products and services
michaelherold
247
13k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
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