File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 55namespace NotificationChannels \Cmsms ;
66
77use GuzzleHttp \Client as GuzzleClient ;
8+ use Illuminate \Foundation \Application ;
9+ use Illuminate \Notifications \ChannelManager ;
810use Illuminate \Support \ServiceProvider ;
911use NotificationChannels \Cmsms \Exceptions \InvalidConfiguration ;
1012
1113class CmsmsServiceProvider extends ServiceProvider
1214{
13- public function boot (): void
15+ public function register (): void
1416 {
1517 $ this ->app ->when (CmsmsChannel::class)
1618 ->needs (CmsmsClient::class)
@@ -21,5 +23,9 @@ public function boot(): void
2123
2224 return new CmsmsClient (new GuzzleClient (), $ productToken );
2325 });
26+
27+ $ this ->app ->afterResolving (ChannelManager::class, static function (ChannelManager $ manager ) {
28+ $ manager ->extend ('cmsms ' , static fn (Application $ app ) => $ app ->make (CmsmsChannel::class));
29+ });
2430 }
2531}
You can’t perform that action at this time.
0 commit comments