HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: /home/xedaptot/ai.naniguide.com/app/Http/Requests/Refactor/Ads/AdsSettingsUpdateRequest.php
<?php

namespace App\Http\Requests\Refactor\Ads;

use Illuminate\Foundation\Http\FormRequest;

/**
 * Phase N — Admin ads settings wizard save.
 *
 * Accepts per-platform credentials plus global settings. All fields are nullable
 * so admin can save partially filled wizard (e.g. only Meta + Google, skip TikTok).
 */
class AdsSettingsUpdateRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true; // Permission check in controller
    }

    public function rules(): array
    {
        return [
            'ads_meta_app_id' => ['nullable', 'string', 'max:255'],
            'ads_meta_app_secret' => ['nullable', 'string', 'max:255'],

            'ads_google_client_id' => ['nullable', 'string', 'max:255'],
            'ads_google_client_secret' => ['nullable', 'string', 'max:255'],
            'ads_google_developer_token' => ['nullable', 'string', 'max:255'],

            'ads_tiktok_app_id' => ['nullable', 'string', 'max:255'],
            'ads_tiktok_app_secret' => ['nullable', 'string', 'max:255'],

            'ads_linkedin_client_id' => ['nullable', 'string', 'max:255'],
            'ads_linkedin_client_secret' => ['nullable', 'string', 'max:255'],

            'ads_mock_mode' => ['nullable', 'in:yes,no,1,0'],
            'ads_metrics_sync_interval' => ['nullable', 'integer', 'min:1', 'max:1440'],
            'ads_rate_limit_buffer' => ['nullable', 'integer', 'min:50', 'max:100'],
        ];
    }
}