Skip to content

Commit

Permalink
doc updated
Browse files Browse the repository at this point in the history
  • Loading branch information
sujancse committed Jan 16, 2020
1 parent 5ce359c commit 473d17f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ $columns = [
'email'
];
$users = User::query(); // Query builder
$queryBuilder = User::query(); // Query builder
Exporter::init($users, $columns, 'users.csv');
Exporter::init($queryBuilder, $columns, 'users.csv');
Exporter::export();
```

Expand All @@ -37,12 +37,10 @@ $columns = [
]
];
$exporter = new Export(
Post::with('user'), // Query Builder
$columns
);
$queryBuilder = Post::with('user'); // Query builder
$exporter->export();
Exporter::init($queryBuilder, $columns, 'users.csv');
Exporter::export();
```

Where `user` is the relation name, which is same as is in the `$columns` variable.
Expand Down

0 comments on commit 473d17f

Please sign in to comment.