Replace settings repository

This commit is contained in:
Lance Pioch 2022-10-24 01:03:53 -04:00
parent e49ba65709
commit e5d5d7de4d
8 changed files with 76 additions and 118 deletions

View file

@ -8,7 +8,7 @@ use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Encryption\Encrypter;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Contracts\Config\Repository as ConfigRepository;
use Pterodactyl\Contracts\Repository\SettingsRepositoryInterface;
use Pterodactyl\Models\Setting;
class SettingsServiceProvider extends ServiceProvider
{
@ -57,7 +57,7 @@ class SettingsServiceProvider extends ServiceProvider
/**
* Boot the service provider.
*/
public function boot(ConfigRepository $config, Encrypter $encrypter, Log $log, SettingsRepositoryInterface $settings)
public function boot(ConfigRepository $config, Encrypter $encrypter, Log $log)
{
// Only set the email driver settings from the database if we
// are configured using SMTP as the driver.
@ -66,7 +66,7 @@ class SettingsServiceProvider extends ServiceProvider
}
try {
$values = $settings->all()->mapWithKeys(function ($setting) {
$values = Setting::all()->mapWithKeys(function ($setting) {
return [$setting->key => $setting->value];
})->toArray();
} catch (QueryException $exception) {