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 @@ -19,6 +19,8 @@ class Slack
1919
2020 protected bool $ persist = false ;
2121
22+ protected ?string $ channel = null ;
23+
2224 public function __construct ($ args = null )
2325 {
2426 $ this ->queue = collect ($ args )->flatten ();
@@ -43,6 +45,13 @@ public function persist($persist = true): self
4345 return $ this ;
4446 }
4547
48+ public function channel ($ channel = null ): self
49+ {
50+ $ this ->channel = $ channel ;
51+
52+ return $ this ;
53+ }
54+
4655 private function send ($ item )
4756 {
4857 /**
@@ -81,7 +90,7 @@ private function send($item)
8190 return call_user_func ($ cb , $ notification );
8291 }
8392
84- NotificationFacade::route ('slack ' , config ('developer.slack_dev_hook ' ))->notify (
93+ NotificationFacade::route ('slack ' , $ this -> channel ?? config ('developer.slack_dev_hook ' ))->notify (
8594 $ notification
8695 );
8796
You can’t perform that action at this time.
0 commit comments