mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
add static variable for Setting::get (#144)
* add static variable for setting * add static variable for get_user_row Co-authored-by: Rey5 <mtylweb@gmail.com>
This commit is contained in:
@@ -29,6 +29,8 @@ 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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user