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

Enum support on query builder #37

Open
reyadrian opened this issue Jun 30, 2023 · 1 comment
Open

Enum support on query builder #37

reyadrian opened this issue Jun 30, 2023 · 1 comment

Comments

@reyadrian
Copy link

Having a support enum as a value in the query builder would be nice, just like the model.

i.e.
Transaction::filter('status', '=', StatusEnum::SUCCESS)->scan();

Instead of doing this, stating the string:
Transaction::filter('status', '=', StatusEnum::SUCCESS->value)->scan();

@kitar
Copy link
Owner

kitar commented Jul 14, 2023

Hi @reyadrian , thank you for your suggestion :)

It looks promising, but I think we might need to stop supporting older versions of Eloquent (< 8.x) to implement it smoothly. I'll give this some thought.

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

No branches or pull requests

2 participants