From c85fee9232ce8910e2e44734005ad5ee7ff5181e Mon Sep 17 00:00:00 2001 From: xboard <147830212+cedar2025@users.noreply.github.com> Date: Mon, 17 Feb 2025 17:01:08 +0800 Subject: [PATCH] fix(setting): change cache driver from octane to redis in Setting class --- app/Support/Setting.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/Support/Setting.php b/app/Support/Setting.php index 09507b9..d112ef9 100644 --- a/app/Support/Setting.php +++ b/app/Support/Setting.php @@ -14,7 +14,7 @@ class Setting private $cache; public function __construct() { - $this->cache = Cache::store('octane'); + $this->cache = Cache::store('redis'); } /** * 获取配置. @@ -89,4 +89,14 @@ class Setting return []; } } + + /** + * 将所有设置转换为数组 + * + * @return array + */ + public function toArray(): array + { + return $this->fromDatabase(); + } }