]> BookStack Code Mirror - bookstack/blob - app/Providers/CustomFacadeProvider.php
bd4b2b515d47dbff9cad199fcc62b361caffb3b2
[bookstack] / app / Providers / CustomFacadeProvider.php
1 <?php
2
3 namespace BookStack\Providers;
4
5 use BookStack\Services\ViewService;
6 use Illuminate\Support\ServiceProvider;
7 use BookStack\Services\ActivityService;
8 use BookStack\Services\SettingService;
9
10 class CustomFacadeProvider extends ServiceProvider
11 {
12     /**
13      * Bootstrap the application services.
14      *
15      * @return void
16      */
17     public function boot()
18     {
19         //
20     }
21
22     /**
23      * Register the application services.
24      *
25      * @return void
26      */
27     public function register()
28     {
29         $this->app->bind('activity', function() {
30             return new ActivityService($this->app->make('BookStack\Activity'));
31         });
32
33         $this->app->bind('views', function() {
34             return new ViewService($this->app->make('BookStack\View'));
35         });
36
37         $this->app->bind('setting', function() {
38             return new SettingService(
39                 $this->app->make('BookStack\Setting'),
40                 $this->app->make('Illuminate\Contracts\Cache\Repository')
41             );
42         });
43     }
44 }