diff --git a/app/Livewire/Settings/Index.php b/app/Livewire/Settings/Index.php index c52970258..4eab505e9 100644 --- a/app/Livewire/Settings/Index.php +++ b/app/Livewire/Settings/Index.php @@ -60,7 +60,7 @@ class Index extends Component public function mount() { if (isInstanceAdmin()) { - $this->settings = InstanceSettings::get(); + $this->settings = instanceSettings(); $this->do_not_track = $this->settings->do_not_track; $this->is_auto_update_enabled = $this->settings->is_auto_update_enabled; $this->is_registration_enabled = $this->settings->is_registration_enabled; diff --git a/app/Models/InstanceSettings.php b/app/Models/InstanceSettings.php index 6a9876c9b..bb3d1478b 100644 --- a/app/Models/InstanceSettings.php +++ b/app/Models/InstanceSettings.php @@ -89,12 +89,12 @@ class InstanceSettings extends Model implements SendsEmail public function helperVersion(): Attribute { return Attribute::make( - get: function () { + get: function ($value) { if (isDev()) { return 'latest'; } - return $this->helper_version; + return $value; } ); } diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 080d0d016..3ed2c2d13 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -3893,3 +3893,7 @@ function convertComposeEnvironmentToArray($environment) return $convertedServiceVariables; } +function instanceSettings() +{ + return InstanceSettings::get(); +}