user() !== null; } public function rules(): array { return [ 'parent_id' => ['required', 'integer', 'min:1'], 'request_type' => ['required', 'string', 'in:tuition,overpayment,duplicate,extra'], 'amount' => ['required_unless:request_type,tuition', 'numeric', 'min:0.01'], 'invoice_id' => ['nullable', 'integer', 'min:1'], 'payment_id' => ['nullable', 'integer', 'min:1'], 'reason' => ['nullable', 'string', 'max:2000'], 'school_year' => ['nullable', 'string', 'max:20'], 'semester' => ['nullable', 'string', 'max:20'], ]; } }