3 namespace BookStack\Providers;
5 use BookStack\Activity;
6 use BookStack\Services\ImageService;
7 use BookStack\Services\PermissionService;
8 use BookStack\Services\ViewService;
11 use Illuminate\Contracts\Cache\Repository;
12 use Illuminate\Contracts\Filesystem\Factory;
13 use Illuminate\Support\ServiceProvider;
14 use BookStack\Services\ActivityService;
15 use BookStack\Services\SettingService;
16 use Intervention\Image\ImageManager;
18 class CustomFacadeProvider extends ServiceProvider
21 * Bootstrap the application services.
25 public function boot()
31 * Register the application services.
35 public function register()
37 $this->app->bind('activity', function() {
38 return new ActivityService(
39 $this->app->make(Activity::class),
40 $this->app->make(PermissionService::class)
44 $this->app->bind('views', function() {
45 return new ViewService(
46 $this->app->make(View::class),
47 $this->app->make(PermissionService::class)
51 $this->app->bind('setting', function() {
52 return new SettingService(
53 $this->app->make(Setting::class),
54 $this->app->make(Repository::class)
58 $this->app->bind('images', function() {
59 return new ImageService(
60 $this->app->make(ImageManager::class),
61 $this->app->make(Factory::class),
62 $this->app->make(Repository::class)