Skip to content

Commit

Permalink
docs: table definition
Browse files Browse the repository at this point in the history
  • Loading branch information
yajra committed May 29, 2024
1 parent a70beb1 commit 0eedfa2
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,17 @@ $loader->inFile(database_path('files/employees.csv'))
->as('employees.ctl')
->options(['skip=1'])
->method(Yajra\SQLLoader\Method::TRUNCATE)
->delimiter(',')
->enclosure('"')
->into('employees', [
'name',
'dept_id',
])
->into(
table: 'employees',
columns: [
'name',
'dept_id',
],
terminatedBy: ',',
optionally: true,
enclosedBy: '"',
trailing: null
)
->disk('local')
->execute();

Expand Down

0 comments on commit 0eedfa2

Please sign in to comment.