Skip to content

Commit 122e5c2

Browse files
authored
[11.x] Add applyAfterQueryCallbacks Support to Non-Mutator Cases in pluck Method (#54268)
This PR enhances the pluck method by introducing support for applyAfterQueryCallbacks in cases where mutators are not involved.
1 parent fffdd53 commit 122e5c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Database/Eloquent/Builder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ public function pluck($column, $key = null)
950950
if (! $this->model->hasAnyGetMutator($column) &&
951951
! $this->model->hasCast($column) &&
952952
! in_array($column, $this->model->getDates())) {
953-
return $results;
953+
return $this->applyAfterQueryCallbacks($results);
954954
}
955955

956956
return $this->applyAfterQueryCallbacks(

0 commit comments

Comments
 (0)