Skip to content

Conversation

@batinmustu
Copy link
Contributor

This PR modifies the pluck method to ensure that applyAfterQueryCallbacks is consistently applied, regardless of whether the column requires a mutator or casting.

Changes Made:
• Moved the applyAfterQueryCallbacks call to encompass non-mutator cases.
• Previously, applyAfterQueryCallbacks was only invoked when a mutator or cast was involved. With this change, it now applies to all results, providing more predictable and consistent behavior.

Benefits:
• Ensures that any callbacks registered with applyAfterQueryCallbacks are executed for all pluck results.
• Improves consistency in how pluck handles query results, regardless of column type or model-specific behavior.

Impact:
• Maintains backward compatibility with existing behavior.
• No breaking changes; the default functionality is preserved.

…luck Method

This PR enhances the pluck method by introducing support for applyAfterQueryCallbacks in cases where mutators are not involved.
@taylorotwell taylorotwell merged commit 122e5c2 into laravel:11.x Jan 20, 2025
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants