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