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\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;
20 class CustomFacadeProvider extends ServiceProvider
23 * Bootstrap the application services.
27 public function boot()
33 * Register the application services.
37 public function register()
39 $this->app->bind('activity', function () {
40 return new ActivityService(
41 $this->app->make(Activity::class),
42 $this->app->make(PermissionService::class)
46 $this->app->bind('views', function () {
47 return new ViewService(
48 $this->app->make(View::class),
49 $this->app->make(PermissionService::class)
53 $this->app->bind('setting', function () {
54 return new SettingService(
55 $this->app->make(Setting::class),
56 $this->app->make(Repository::class)
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)