]> BookStack Code Mirror - bookstack/blob - app/Providers/CustomFacadeProvider.php
Added tests and translations for dark-mode components
[bookstack] / app / Providers / CustomFacadeProvider.php
1 <?php
2
3 namespace BookStack\Providers;
4
5 use BookStack\Actions\ActivityService;
6 use BookStack\Actions\ViewService;
7 use BookStack\Auth\Permissions\PermissionService;
8 use BookStack\Settings\SettingService;
9 use BookStack\Uploads\ImageService;
10 use Illuminate\Support\ServiceProvider;
11
12 class CustomFacadeProvider extends ServiceProvider
13 {
14     /**
15      * Bootstrap the application services.
16      *
17      * @return void
18      */
19     public function boot()
20     {
21         //
22     }
23
24     /**
25      * Register the application services.
26      *
27      * @return void
28      */
29     public function register()
30     {
31         $this->app->singleton('activity', function () {
32             return $this->app->make(ActivityService::class);
33         });
34
35         $this->app->singleton('views', function () {
36             return $this->app->make(ViewService::class);
37         });
38
39         $this->app->singleton('setting', function () {
40             return $this->app->make(SettingService::class);
41         });
42
43         $this->app->singleton('images', function () {
44             return $this->app->make(ImageService::class);
45         });
46
47         $this->app->singleton('permissions', function () {
48             return $this->app->make(PermissionService::class);
49         });
50     }
51 }