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
When using a wildcard path, the first file is assumed to contain the headers. The succeeding files should not have headers or it will be reported as a bad record.
176
+
177
+
```php
178
+
$loader->inFile(database_path('files/*.csv'))
179
+
->withHeaders()
180
+
->mode(Yajra\SQLLoader\Mode::TRUNCATE)
181
+
->into('employees')
182
+
->execute();
183
+
```
184
+
185
+
- employees-1.csv
186
+
187
+
```csv
188
+
name,dept_id
189
+
John Doe,1
190
+
Jane Doe,2
191
+
```
192
+
193
+
- employees-2.csv
194
+
195
+
```csv
196
+
John Doe,1
197
+
Jane Doe,2
198
+
```
199
+
173
200
### Connection
174
201
175
202
You can set the connection name to use for the SQL*Loader command using the `connection` method.
0 commit comments