File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed
src/Illuminate/Broadcasting Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,17 @@ protected function callCustomCreator(array $config)
213213 * @return \Illuminate\Contracts\Broadcasting\Broadcaster
214214 */
215215 protected function createPusherDriver (array $ config )
216+ {
217+ return new PusherBroadcaster ($ this ->pusher ($ config ));
218+ }
219+
220+ /**
221+ * Get a Pusher instance for the given configuration.
222+ *
223+ * @param array $config
224+ * @return \Pusher\Pusher
225+ */
226+ public function pusher (array $ config )
216227 {
217228 $ pusher = new Pusher (
218229 $ config ['key ' ],
@@ -228,7 +239,7 @@ protected function createPusherDriver(array $config)
228239 $ pusher ->setLogger ($ this ->app ->make (LoggerInterface::class));
229240 }
230241
231- return new PusherBroadcaster ( $ pusher) ;
242+ return $ pusher ;
232243 }
233244
234245 /**
@@ -239,7 +250,18 @@ protected function createPusherDriver(array $config)
239250 */
240251 protected function createAblyDriver (array $ config )
241252 {
242- return new AblyBroadcaster (new AblyRest ($ config ));
253+ return new AblyBroadcaster ($ this ->ably ($ config ));
254+ }
255+
256+ /**
257+ * Get an Ably instance for the given configuration.
258+ *
259+ * @param array $config
260+ * @return \Ably\AblyRest
261+ */
262+ public function ably (array $ config )
263+ {
264+ return new AblyRest ($ config );
243265 }
244266
245267 /**
You can’t perform that action at this time.
0 commit comments