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
+3 -3
View File
@@ -260,9 +260,9 @@ class AuthController extends Controller
$message = "{$data['name']} عزیز، اکانت شما در پلتفرم {$this->Config('name_fa')} ایجاد شد.";
if ($cfg->getBool('register_referral_bonus_message', false)) {
$bonus = Setting::where('is_active', 1)->where('key', 'referral_bonus_amount')->first();
if ($bonus) {
$bonusValues = json_decode($bonus->value, true);
$bonusRaw = $cfg->getString('referral_bonus_amount');
if ($bonusRaw !== '') {
$bonusValues = json_decode($bonusRaw, true);
$message .= "\nپس از اولین خرید مقدار، " . number_format((int) ($bonusValues[0]['customer'] ?? 0)) . ' ریال پاداش دریافت خواهید کرد.';
}
}