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'],
];
}
}