Updated view toggle to store date

Also added test for user list order preferences
This commit is contained in:
Dan Brown
2019-04-14 13:01:51 +01:00
parent 01be72d5e2
commit 9406b4d4c9
11 changed files with 155 additions and 20 deletions

View File

@ -67,6 +67,17 @@ class SettingService
return $this->get($this->userKey($user->id, $key), $default);
}
/**
* Get a value for the current logged-in user.
* @param $key
* @param bool $default
* @return bool|string
*/
public function getForCurrentUser($key, $default = false)
{
return $this->getUser(auth()->user(), $key, $default);
}
/**
* Gets a setting value from the cache or database.
* Looks at the system defaults if not cached or in database.