Skip to content

Commit 6da646f

Browse files
committed
Minor fix on pluck()
1 parent b1ca34a commit 6da646f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Eloquent/BaseRepository.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ public function makeModel(): Model
7070
public function pluck($column, $key = null): mixed
7171
{
7272
$this->applyScope();
73-
return $this->model->pluck($column, $key);
73+
74+
$results = $this->model->pluck($column, $key);
75+
76+
$this->resetModel();
77+
$this->resetScope();
78+
79+
return $results;
7480
}
7581

7682
public function sync($id, $relation, $attributes, $detaching = true): mixed

0 commit comments

Comments
 (0)