Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Notifications;
4
 
5
use Illuminate\Contracts\Notifications\Dispatcher as DispatcherContract;
6
use Illuminate\Contracts\Notifications\Factory as FactoryContract;
7
use Illuminate\Support\ServiceProvider;
8
 
9
class NotificationServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Boot the application services.
13
     *
14
     * @return void
15
     */
16
    public function boot()
17
    {
18
        $this->loadViewsFrom(__DIR__.'/resources/views', 'notifications');
19
 
20
        if ($this->app->runningInConsole()) {
21
            $this->publishes([
22
                __DIR__.'/resources/views' => $this->app->resourcePath('views/vendor/notifications'),
23
            ], 'laravel-notifications');
24
        }
25
    }
26
 
27
    /**
28
     * Register the service provider.
29
     *
30
     * @return void
31
     */
32
    public function register()
33
    {
34
        $this->app->singleton(ChannelManager::class, function ($app) {
35
            return new ChannelManager($app);
36
        });
37
 
38
        $this->app->alias(
39
            ChannelManager::class, DispatcherContract::class
40
        );
41
 
42
        $this->app->alias(
43
            ChannelManager::class, FactoryContract::class
44
        );
45
    }
46
}