]> BookStack Code Mirror - bookstack/blob - app/Providers/CustomFacadeProvider.php
Update Dutch password_hint translation to correspond with validation rule
[bookstack] / app / Providers / CustomFacadeProvider.php
1 <?php
2
3 namespace BookStack\Providers;
4
5 use BookStack\Actions\Activity;
6 use BookStack\Actions\ActivityService;
7 use BookStack\Actions\View;
8 use BookStack\Actions\ViewService;
9 use BookStack\Auth\Permissions\PermissionService;
10 use BookStack\Settings\Setting;
11 use BookStack\Settings\SettingService;
12 use BookStack\Uploads\HttpFetcher;
13 use BookStack\Uploads\Image;
14 use BookStack\Uploads\ImageService;
15 use Illuminate\Contracts\Cache\Repository;
16 use Illuminate\Contracts\Filesystem\Factory;
17 use Illuminate\Support\ServiceProvider;
18 use Intervention\Image\ImageManager;
19
20 class CustomFacadeProvider extends ServiceProvider
21 {
22     /**
23      * Bootstrap the application services.
24      *
25      * @return void
26      */
27     public function boot()
28     {
29         //
30     }
31
32     /**
33      * Register the application services.
34      *
35      * @return void
36      */
37     public function register()
38     {
39         $this->app->bind('activity', function () {
40             return new ActivityService(
41                 $this->app->make(Activity::class),
42                 $this->app->make(PermissionService::class)
43             );
44         });
45
46         $this->app->bind('views', function () {
47             return new ViewService(
48                 $this->app->make(View::class),
49                 $this->app->make(PermissionService::class)
50             );
51         });
52
53         $this->app->bind('setting', function () {
54             return new SettingService(
55                 $this->app->make(Setting::class),
56                 $this->app->make(Repository::class)
57             );
58         });
59
60         $this->app->bind('images', function () {
61             return new ImageService(
62                 $this->app->make(Image::class),
63                 $this->app->make(ImageManager::class),
64                 $this->app->make(Factory::class),
65                 $this->app->make(Repository::class),
66                 $this->app->make(HttpFetcher::class)
67             );
68         });
69     }
70 }