Skip to content
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

[11.x] Add strict-mode safe hasAttribute method to Eloquent #50909

Merged
merged 2 commits into from Apr 5, 2024

Conversation

mateusjatenee
Copy link
Contributor

Right now, it's a bit hard to safely check whether an attribute exists if you're using strict mode because it'll throw an exception in case it doesn't exist.

This PR just extracts some logic into a hasAttribute method. Might be useful here #50908 if it gets moved forward.

@taylorotwell taylorotwell merged commit 92beae3 into laravel:11.x Apr 5, 2024
29 of 30 checks passed
@taylorotwell
Copy link
Member

@mateusjatenee yeah you could probably update #50908 now and mark it ready for review again.

@mateusjatenee mateusjatenee deleted the feat/has-attribute branch April 5, 2024 15:48
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.

None yet

2 participants