Skip to content

Commit

Permalink
[11.x] Add applyAfterQueryCallbacks Support to Non-Mutator Cases in p…
Browse files Browse the repository at this point in the history
…luck Method (#54268)

This PR enhances the pluck method by introducing support for applyAfterQueryCallbacks in cases where mutators are not involved.
  • Loading branch information
batinmustu authored Jan 20, 2025
1 parent fffdd53 commit 122e5c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ public function pluck($column, $key = null)
if (! $this->model->hasAnyGetMutator($column) &&
! $this->model->hasCast($column) &&
! in_array($column, $this->model->getDates())) {
return $results;
return $this->applyAfterQueryCallbacks($results);
}

return $this->applyAfterQueryCallbacks(
Expand Down

0 comments on commit 122e5c2

Please sign in to comment.