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

View File

@@ -29,11 +29,12 @@ class Setting extends NexusModel
*/
public static function get($name = null, $default = null): mixed
{
static $settings=null;
if(is_null($settings))
$settings = NexusDB::remember("nexus_settings_in_laravel", 600, function () {
return self::getFromDb();
});
static $settings = null;
if (is_null($settings)) {
$settings = NexusDB::remember("nexus_settings_in_laravel", 600, function () {
return self::getFromDb();
});
}
if (is_null($name)) {
return $settings;
}