Optimise the setting of our configuration via Setup::class, optimise the calculation of our_addresses()

This commit is contained in:
2024-11-02 23:30:42 +11:00
parent 1b228a58c9
commit 3b7ce4b9ce
9 changed files with 72 additions and 66 deletions

View File

@@ -71,9 +71,6 @@ class Setup extends Model
case 'msgs_pkt':
return Arr::get($this->options,$key,self::MAX_MSGS_PKT);
case 'version':
return File::exists('VERSION') ? chop(File::get('VERSION')) : 'dev';
default:
return parent::__get($key);
}
@@ -113,6 +110,16 @@ class Setup extends Model
return hexstr($c);
}
/**
* Application version
*
* @return string
*/
public static function version(): string
{
return File::exists('VERSION') ? chop(File::get('VERSION')) : 'dev';
}
/* RELATIONS */
/**