<?php
 namespace App\Http\Requests\Admin; use Illuminate\Foundation\Http\FormRequest; class TaxSettingsUpdateRequest extends FormRequest { public function authorize(): bool { return $this->user()->can('updateSettings', \App\Models\TaxRule::class); } public function rules(): array { return [ 'default_tax_rate' => ['nullable', 'numeric', 'min:0', 'max:100'], 'taxable_types' => ['optional', 'array', 'min:1'], 'taxable_types.*' => ['in:domain,hosting'], 'tax_method' => ['required', 'in:inclusive,exclusive'], 'tax_id_required' => ['required', 'in:0,1'], 'show_company_tax_info' => ['required', 'in:0,1'], 'company_tax_info' => ['nullable', 'string'], ]; } } 