X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ea55b7f141a70e2d6edb209f6c48610a9c005e4e..refs/pull/363/head:/app/Providers/CustomFacadeProvider.php diff --git a/app/Providers/CustomFacadeProvider.php b/app/Providers/CustomFacadeProvider.php index bd4b2b515..b2c7acf5e 100644 --- a/app/Providers/CustomFacadeProvider.php +++ b/app/Providers/CustomFacadeProvider.php @@ -2,10 +2,18 @@ namespace BookStack\Providers; +use BookStack\Activity; +use BookStack\Services\ImageService; +use BookStack\Services\PermissionService; use BookStack\Services\ViewService; +use BookStack\Setting; +use BookStack\View; +use Illuminate\Contracts\Cache\Repository; +use Illuminate\Contracts\Filesystem\Factory; use Illuminate\Support\ServiceProvider; use BookStack\Services\ActivityService; use BookStack\Services\SettingService; +use Intervention\Image\ImageManager; class CustomFacadeProvider extends ServiceProvider { @@ -27,17 +35,31 @@ class CustomFacadeProvider extends ServiceProvider public function register() { $this->app->bind('activity', function() { - return new ActivityService($this->app->make('BookStack\Activity')); + return new ActivityService( + $this->app->make(Activity::class), + $this->app->make(PermissionService::class) + ); }); $this->app->bind('views', function() { - return new ViewService($this->app->make('BookStack\View')); + return new ViewService( + $this->app->make(View::class), + $this->app->make(PermissionService::class) + ); }); $this->app->bind('setting', function() { return new SettingService( - $this->app->make('BookStack\Setting'), - $this->app->make('Illuminate\Contracts\Cache\Repository') + $this->app->make(Setting::class), + $this->app->make(Repository::class) + ); + }); + + $this->app->bind('images', function() { + return new ImageService( + $this->app->make(ImageManager::class), + $this->app->make(Factory::class), + $this->app->make(Repository::class) ); }); }