3 namespace BookStack\Providers;
5 use BookStack\Activity;
7 use BookStack\Services\ImageService;
8 use BookStack\Services\PermissionService;
9 use BookStack\Services\ViewService;
10 use BookStack\Setting;
12 use Illuminate\Contracts\Cache\Repository;
13 use Illuminate\Contracts\Filesystem\Factory;
14 use Illuminate\Support\ServiceProvider;
15 use BookStack\Services\ActivityService;
16 use BookStack\Services\SettingService;
17 use Intervention\Image\ImageManager;
19 class CustomFacadeProvider extends ServiceProvider
22 * Bootstrap the application services.
26 public function boot()
32 * Register the application services.
36 public function register()
38 $this->app->bind('activity', function () {
39 return new ActivityService(
40 $this->app->make(Activity::class),
41 $this->app->make(PermissionService::class)
45 $this->app->bind('views', function () {
46 return new ViewService(
47 $this->app->make(View::class),
48 $this->app->make(PermissionService::class)
52 $this->app->bind('setting', function () {
53 return new SettingService(
54 $this->app->make(Setting::class),
55 $this->app->make(Repository::class)
59 $this->app->bind('images', function () {
60 return new ImageService(
61 $this->app->make(Image::class),
62 $this->app->make(ImageManager::class),
63 $this->app->make(Factory::class),
64 $this->app->make(Repository::class)