You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,6 +102,40 @@ All query keys are normalized to camelCase:
102
102
-`user-name` → `userName`
103
103
-`UserName` → `userName`
104
104
105
+
### Input Format Requirements
106
+
107
+
Ray.InputQuery expects **flat key-value pairs** as input. Nested array structures are not supported:
108
+
109
+
```php
110
+
// ✅ Correct - Flat structure
111
+
$data = [
112
+
'customerName' => 'John Doe',
113
+
'customerEmail' => 'john@example.com',
114
+
'shippingCity' => 'Tokyo'
115
+
];
116
+
117
+
// ❌ Wrong - Nested arrays (e.g., from customer[name] form fields)
118
+
$data = [
119
+
'customer' => [
120
+
'name' => 'John Doe',
121
+
'email' => 'john@example.com'
122
+
]
123
+
];
124
+
```
125
+
126
+
**Why this restriction?** When nested objects are flattened for database operations, all property names must be globally unique to avoid conflicts. This design ensures predictable parameter binding and prevents naming collisions.
127
+
For HTML forms, use flat naming:
128
+
129
+
```html
130
+
<!-- ✅ Correct -->
131
+
<inputname="customerName">
132
+
<inputname="customerEmail">
133
+
134
+
<!-- ❌ Avoid -->
135
+
<inputname="customer[name]">
136
+
<inputname="customer[email]">
137
+
```
138
+
105
139
## Integration
106
140
107
141
Ray.InputQuery is designed as a foundation library to be used by:
0 commit comments