2015-08-17 01:59:23 +08:00
|
|
|
<?php
|
|
|
|
|
2015-09-11 02:31:09 +08:00
|
|
|
namespace BookStack\Providers;
|
2015-08-17 01:59:23 +08:00
|
|
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
2015-09-11 02:31:09 +08:00
|
|
|
use BookStack\Services\ActivityService;
|
|
|
|
use BookStack\Services\SettingService;
|
2015-08-17 01:59:23 +08:00
|
|
|
|
|
|
|
class CustomFacadeProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Bootstrap the application services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register the application services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function register()
|
|
|
|
{
|
|
|
|
$this->app->bind('activity', function() {
|
2015-09-11 02:31:09 +08:00
|
|
|
return new ActivityService($this->app->make('BookStack\Activity'));
|
2015-08-17 01:59:23 +08:00
|
|
|
});
|
2015-08-30 22:31:16 +08:00
|
|
|
|
|
|
|
$this->app->bind('setting', function() {
|
2015-09-06 22:26:31 +08:00
|
|
|
return new SettingService(
|
2015-09-11 02:31:09 +08:00
|
|
|
$this->app->make('BookStack\Setting'),
|
2015-09-06 22:26:31 +08:00
|
|
|
$this->app->make('Illuminate\Contracts\Cache\Repository')
|
|
|
|
);
|
2015-08-30 22:31:16 +08:00
|
|
|
});
|
2015-08-17 01:59:23 +08:00
|
|
|
}
|
|
|
|
}
|