format code style

This commit is contained in:
xiaomlove
2022-12-19 19:17:22 +08:00
parent 7f86e69956
commit eaf2a57421
2 changed files with 9 additions and 8 deletions
+2 -1
View File
@@ -30,10 +30,11 @@ class Setting extends NexusModel
public static function get($name = null, $default = null): mixed public static function get($name = null, $default = null): mixed
{ {
static $settings = null; static $settings = null;
if(is_null($settings)) if (is_null($settings)) {
$settings = NexusDB::remember("nexus_settings_in_laravel", 600, function () { $settings = NexusDB::remember("nexus_settings_in_laravel", 600, function () {
return self::getFromDb(); return self::getFromDb();
}); });
}
if (is_null($name)) { if (is_null($name)) {
return $settings; return $settings;
} }