@@ 73-86 (lines=14) @@ | ||
70 | * |
|
71 | * @return \Illuminate\Notifications\Messages\SlackMessage |
|
72 | */ |
|
73 | public function toSlack(): SlackMessage |
|
74 | { |
|
75 | $replace = $this->data(); |
|
76 | ||
77 | return (new SlackMessage) |
|
78 | ->error() |
|
79 | ->from(config('api-health.notifications.slack.username'), config('api-health.notifications.slack.icon')) |
|
80 | ->to(config('api-health.notifications.slack.channel')) |
|
81 | ->content(implode(PHP_EOL, [ |
|
82 | trans('api-health::notifications.checker_failed_type', $replace), |
|
83 | trans('api-health::notifications.checker_failed_at', $replace), |
|
84 | trans('api-health::notifications.checker_failed_exception', $replace), |
|
85 | ])); |
|
86 | } |
|
87 | } |
|
88 |
@@ 68-81 (lines=14) @@ | ||
65 | * |
|
66 | * @return \Illuminate\Notifications\Messages\SlackMessage |
|
67 | */ |
|
68 | public function toSlack(): SlackMessage |
|
69 | { |
|
70 | $replace = $this->data(); |
|
71 | ||
72 | return (new SlackMessage) |
|
73 | ->success() |
|
74 | ->from(config('api-health.notifications.slack.username'), config('api-health.notifications.slack.icon')) |
|
75 | ->to(config('api-health.notifications.slack.channel')) |
|
76 | ->content(implode(PHP_EOL, [ |
|
77 | trans('api-health::notifications.checker_recovered_type', $replace), |
|
78 | trans('api-health::notifications.checker_recovered_failed_at', $replace), |
|
79 | trans('api-health::notifications.checker_recovered_exception', $replace), |
|
80 | ])); |
|
81 | } |
|
82 | } |
|
83 |