Skip to content

[12.x] Fix except() method to support casted values #55124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2025

Conversation

vishal2931
Copy link
Contributor

Overview

This PR updates the except() method #55072 to correctly handle casted values, ensuring consistency with only().

As @decadence mentioned #55072 (comment) previously, except() used getAttributes(), which returned raw database values instead of applying attribute casts. This has been fixed by adding $this->getAttribute($value), ensuring filtered attributes retain their correct casted forms.

@taylorotwell taylorotwell merged commit dd246d7 into laravel:12.x Mar 22, 2025
41 checks passed
@vishal2931 vishal2931 deleted the except-method-improvement branch March 22, 2025 06:55
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