Skip to content

Commit

Permalink
Fix collect helper conflict with illuminate/support
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn Peng committed Feb 25, 2019
1 parent cbd4128 commit 47dda95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Processor.php
Expand Up @@ -192,9 +192,9 @@ protected function collect(object $contents)
$data = $contents->data;

if ($this->isCollectAssoc && isset($contents->columns)) {
$columns = collect($contents->columns)->pluck('name');
$columns = (new Collection($contents->columns))->pluck('name');

$data = collect($data)->map(function (array $row) use ($columns) {
$data = (new Collection($data))->map(function (array $row) use ($columns) {
return $columns->combine($row)->toArray();
});
}
Expand Down

0 comments on commit 47dda95

Please sign in to comment.