File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ class Slack
21
21
22
22
protected bool $ persist = false ;
23
23
24
+ protected ?string $ channel = null ;
25
+
24
26
protected bool $ telescope = true ;
25
27
26
28
public function __construct ($ args = null )
@@ -47,6 +49,13 @@ public function persist($persist = true): self
47
49
return $ this ;
48
50
}
49
51
52
+ public function channel (string $ channel ): self
53
+ {
54
+ $ this ->channel = $ channel ;
55
+
56
+ return $ this ;
57
+ }
58
+
50
59
private function send ($ item )
51
60
{
52
61
/**
@@ -89,7 +98,7 @@ private function send($item)
89
98
return call_user_func ($ cb , $ notification );
90
99
}
91
100
92
- NotificationFacade::route ('slack ' , config ('developer.slack_dev_hook ' ))->notify (
101
+ NotificationFacade::route ('slack ' , $ this -> channel ?? config ('developer.slack_dev_hook ' ))->notify (
93
102
$ notification
94
103
);
95
104
You can’t perform that action at this time.
0 commit comments