Also removed old unsused facade that existed for settings.
// Custom BookStack
'Activity' => BookStack\Facades\Activity::class,
- 'Setting' => BookStack\Facades\Setting::class,
'Views' => BookStack\Facades\Views::class,
'Images' => BookStack\Facades\Images::class,
'Permissions' => BookStack\Facades\Permissions::class,
+++ /dev/null
-<?php namespace BookStack\Facades;
-
-use Illuminate\Support\Facades\Facade;
-
-class Setting extends Facade
-{
- /**
- * Get the registered name of the component.
- *
- * @return string
- */
- protected static function getFacadeAccessor()
- {
- return 'setting';
- }
-}
use BookStack\Actions\ActivityService;
use BookStack\Actions\ViewService;
use BookStack\Auth\Permissions\PermissionService;
-use BookStack\Settings\SettingService;
use BookStack\Uploads\ImageService;
use Illuminate\Support\ServiceProvider;
return $this->app->make(ViewService::class);
});
- $this->app->singleton('setting', function () {
- return $this->app->make(SettingService::class);
- });
-
$this->app->singleton('images', function () {
return $this->app->make(ImageService::class);
});
/**
* Helper to access system settings.
- * @return bool|string|SettingService
+ * @return mixed|SettingService
*/
-function setting(string $key = null, $default = false)
+function setting(string $key = null, $default = null)
{
$settingService = resolve(SettingService::class);