File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ class Slack
2121
2222 protected bool $ persist = false ;
2323
24+ protected ?string $ channel = null ;
25+
2426 protected bool $ telescope = true ;
2527
2628 public function __construct ($ args = null )
@@ -47,6 +49,13 @@ public function persist($persist = true): self
4749 return $ this ;
4850 }
4951
52+ public function channel (string $ channel ): self
53+ {
54+ $ this ->channel = $ channel ;
55+
56+ return $ this ;
57+ }
58+
5059 private function send ($ item )
5160 {
5261 /**
@@ -89,7 +98,7 @@ private function send($item)
8998 return call_user_func ($ cb , $ notification );
9099 }
91100
92- NotificationFacade::route ('slack ' , config ('developer.slack_dev_hook ' ))->notify (
101+ NotificationFacade::route ('slack ' , $ this -> channel ?? config ('developer.slack_dev_hook ' ))->notify (
93102 $ notification
94103 );
95104
You can’t perform that action at this time.
0 commit comments