2015-08-16 18:59:23 +01:00
|
|
|
<?php
|
|
|
|
|
2015-09-10 19:31:09 +01:00
|
|
|
namespace BookStack\Providers;
|
2015-08-16 18:59:23 +01:00
|
|
|
|
2018-09-25 16:58:03 +01:00
|
|
|
use BookStack\Actions\ActivityService;
|
2018-09-25 12:30:50 +01:00
|
|
|
use BookStack\Actions\ViewService;
|
2019-09-20 00:18:28 +01:00
|
|
|
use BookStack\Auth\Permissions\PermissionService;
|
2018-09-25 16:58:03 +01:00
|
|
|
use BookStack\Settings\SettingService;
|
|
|
|
use BookStack\Uploads\ImageService;
|
2015-08-16 18:59:23 +01:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
|
|
|
class CustomFacadeProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Bootstrap the application services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register the application services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function register()
|
|
|
|
{
|
2019-09-20 00:18:28 +01:00
|
|
|
$this->app->singleton('activity', function () {
|
2019-03-30 16:54:15 +00:00
|
|
|
return $this->app->make(ActivityService::class);
|
2015-08-16 18:59:23 +01:00
|
|
|
});
|
2015-08-30 15:31:16 +01:00
|
|
|
|
2019-09-20 00:18:28 +01:00
|
|
|
$this->app->singleton('views', function () {
|
2019-03-30 16:54:15 +00:00
|
|
|
return $this->app->make(ViewService::class);
|
2015-11-21 17:22:14 +00:00
|
|
|
});
|
|
|
|
|
2019-09-20 00:18:28 +01:00
|
|
|
$this->app->singleton('setting', function () {
|
2019-03-30 16:54:15 +00:00
|
|
|
return $this->app->make(SettingService::class);
|
2015-08-30 15:31:16 +01:00
|
|
|
});
|
2016-02-28 19:03:04 +00:00
|
|
|
|
2019-09-20 00:18:28 +01:00
|
|
|
$this->app->singleton('images', function () {
|
2019-03-30 16:54:15 +00:00
|
|
|
return $this->app->make(ImageService::class);
|
2015-12-09 19:50:17 +00:00
|
|
|
});
|
2019-09-20 00:18:28 +01:00
|
|
|
|
|
|
|
$this->app->singleton('permissions', function () {
|
|
|
|
return $this->app->make(PermissionService::class);
|
|
|
|
});
|
2015-08-16 18:59:23 +01:00
|
|
|
}
|
|
|
|
}
|