Refactor instanceSettings() function for improved code readability

This commit is contained in:
Andras Bacsai
2024-10-01 10:37:40 +02:00
parent 4d9dcfb84c
commit 83549965ca
35 changed files with 47 additions and 65 deletions

View File

@@ -162,7 +162,7 @@ class Index extends Component
{
CheckForUpdatesJob::dispatchSync();
$this->dispatch('updateAvailable');
$settings = InstanceSettings::get();
$settings = instanceSettings();
if ($settings->new_version_available) {
$this->dispatch('success', 'New version available!');
} else {

View File

@@ -29,7 +29,7 @@ class License extends Component
abort(404);
}
$this->instance_id = config('app.id');
$this->settings = \App\Models\InstanceSettings::get();
$this->settings = instanceSettings();
}
public function render()