Skip to content

Commit

Permalink
🐛 Fix Builder
Browse files Browse the repository at this point in the history
  • Loading branch information
marcreichel committed Jun 27, 2021
1 parent 86a1709 commit aaaf7da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function __construct($model = null)
public function select($fields): self
{
$fields = is_array($fields) ? $fields : func_get_args();
$collection = collect(is_array($fields) ? $fields : func_get_args());
$collection = collect($fields);

if ($collection->isEmpty()) {
$collection->push('*');
Expand All @@ -98,7 +98,7 @@ public function select($fields): self
$collection->push('*');
}

$this->query->put('fields', $fields);
$this->query->put('fields', $collection);

return $this;
}
Expand Down

0 comments on commit aaaf7da

Please sign in to comment.