Skip to content

Commit 556ccc5

Browse files
committed
Method to define fields on repository
1 parent fb96554 commit 556ccc5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Repository/ModelRepository.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,16 @@ public function count(array $record): int
174174
return $this->model->count(Record::make($record));
175175
}
176176

177+
/**
178+
* @param array $fields
179+
* @return ModelRepository
180+
*/
181+
public function fields(array $fields)
182+
{
183+
$this->getModel()->fields($fields);
184+
return $this;
185+
}
186+
177187
/**
178188
* @param array $filter
179189
* @param array $order (null)

0 commit comments

Comments
 (0)