diff --git a/src/Illuminate/Notifications/Messages/SlackMessage.php b/src/Illuminate/Notifications/Messages/SlackMessage.php index f0cf2a095ba0..4cd5b7dc15b1 100644 --- a/src/Illuminate/Notifications/Messages/SlackMessage.php +++ b/src/Illuminate/Notifications/Messages/SlackMessage.php @@ -7,7 +7,7 @@ class SlackMessage { /** - * The "level" of the notification (info, success, error). + * The "level" of the notification (info, success, error, warning). * * @var string */ @@ -79,6 +79,18 @@ public function error() return $this; } + /** + * Indicate that the notification gives information about a warning. + * + * @return $this + */ + public function warning() + { + $this->level = 'warning'; + + return $this; + } + /** * Set a custom user icon for the Slack message. * @@ -147,9 +159,11 @@ public function color() { switch ($this->level) { case 'success': - return '#7CD197'; + return 'good'; case 'error': - return '#F35A00'; + return 'danger'; + case 'warning': + return 'warning'; } }