File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 3
3
namespace Benwilkins \FCM ;
4
4
5
5
use GuzzleHttp \Client ;
6
- use Illuminate \Support \ServiceProvider ;
7
6
use Illuminate \Notifications \ChannelManager ;
7
+ use Illuminate \Support \Facades \Notification ;
8
+ use Illuminate \Support \ServiceProvider ;
8
9
9
10
/**
10
11
* Class FcmNotificationServiceProvider.
@@ -15,9 +16,11 @@ class FcmNotificationServiceProvider extends ServiceProvider
15
16
* Register.
16
17
*/
17
18
public function register ()
18
- {
19
- $ this ->app ->make (ChannelManager::class)->extend ('fcm ' , function () {
20
- return new FcmChannel (app (Client::class), config ('services.fcm.key ' ));
19
+ {
20
+ Notification::resolved (function (ChannelManager $ service ) {
21
+ $ service ->extend ('fcm ' , function () {
22
+ return new FcmChannel (app (Client::class), config ('services.fcm.key ' ));
23
+ });
21
24
});
22
25
}
23
26
}
You can’t perform that action at this time.
0 commit comments