1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Added user setting system and added user-lang option

Supports #115
This commit is contained in:
Dan Brown
2017-01-15 16:27:24 +00:00
parent ee5ded6e1e
commit dabf149411
11 changed files with 124 additions and 25 deletions

View File

@ -60,11 +60,12 @@ function userCan($permission, Ownable $ownable = null)
* Helper to access system settings.
* @param $key
* @param bool $default
* @return mixed
* @return bool|string|\BookStack\Services\SettingService
*/
function setting($key, $default = false)
function setting($key = null, $default = false)
{
$settingService = app(\BookStack\Services\SettingService::class);
if (is_null($key)) return $settingService;
return $settingService->get($key, $default);
}