-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNotificationServiceProvider.php
43 lines (38 loc) · 1.19 KB
/
NotificationServiceProvider.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace Orchestra\Notifications;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Notifications\Dispatcher as DispatcherContract;
use Illuminate\Contracts\Notifications\Factory as FactoryContract;
use Illuminate\Notifications\ChannelManager as Manager;
use Illuminate\Notifications\NotificationServiceProvider as ServiceProvider;
class NotificationServiceProvider extends ServiceProvider
{
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->app->singleton(ChannelManager::class, static function (Container $app) {
return new ChannelManager($app);
});
$this->app->alias(ChannelManager::class, DispatcherContract::class);
$this->app->alias(ChannelManager::class, FactoryContract::class);
$this->app->alias(ChannelManager::class, Manager::class);
}
/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
return [
ChannelManager::class,
DispatcherContract::class,
FactoryContract::class,
Manager::class,
];
}
}