3 namespace BookStack\Providers;
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\Image;
13 use BookStack\Uploads\ImageService;
14 use Illuminate\Contracts\Cache\Repository;
15 use Illuminate\Contracts\Filesystem\Factory;
16 use Illuminate\Support\ServiceProvider;
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)