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

Casting Attributes #2

Open
tehwave opened this issue Dec 21, 2019 · 0 comments
Open

Casting Attributes #2

tehwave opened this issue Dec 21, 2019 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@tehwave
Copy link
Owner

tehwave commented Dec 21, 2019

Attributes are always returned as strings. This can lead to confusing situations. E.g. when you're looking at boolean parameters, you need to check for 'true' and 'false' as strings.

Time could be saved if we were to incorporate the HasAttributes trait used on the Model class.

See: https://github.com/laravel/framework/blob/6.x/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php

@tehwave tehwave added enhancement New feature or request help wanted Extra attention is needed labels Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant