Skip to content

Commit 17681a1

Browse files
authored
Switch to getting all data in the Entry class (#183)
1 parent c02033b commit 17681a1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Entries/EntryQueryBuilder.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected function transform($items, $columns = [])
8787
{
8888
$items = EntryCollection::make($items)->map(function ($model) use ($columns) {
8989
return app('statamic.eloquent.entries.entry')::fromModel($model)
90-
->selectedQueryColumns($columns);
90+
->selectedQueryColumns($this->selectedQueryColumns ?? $columns);
9191
});
9292

9393
return Entry::applySubstitutions($items);
@@ -132,16 +132,20 @@ public function get($columns = ['*'])
132132
$query->limit = PHP_INT_MAX;
133133
}
134134

135+
$this->selectedQueryColumns = $columns;
136+
135137
$this->addTaxonomyWheres();
136138

137-
return parent::get($columns);
139+
return parent::get();
138140
}
139141

140142
public function paginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null)
141143
{
142144
$this->addTaxonomyWheres();
143145

144-
return parent::paginate($perPage, $columns, $pageName, $page);
146+
$this->selectedQueryColumns = $columns;
147+
148+
return parent::paginate($perPage, ['*'], $pageName, $page);
145149
}
146150

147151
public function count()

0 commit comments

Comments
 (0)