fix(settings): read SuperAdmin overlay via ConfigService everywhere

This commit is contained in:
2026-08-22 15:10:54 +03:30
parent 197b49b719
commit 7bdb2c91a0
9 changed files with 31 additions and 35 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ use App\Models\Setting;
use App\Models\SmsLedger;
use App\Models\SmsSendLog;
use App\Models\SmsWallet;
use App\Services\ConfigService;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
@@ -36,7 +37,7 @@ class SmsWalletService
/** Billing/panel فعال است مگر sms_panel صریحاً false باشد. */
public static function isBillingEnabled(): bool
{
$value = Setting::where('key', 'sms_panel')->value('value');
$value = app(ConfigService::class)->getString('sms_panel');
if ($value === null || trim((string) $value) === '') {
return true;