Open reyadrian opened 1 year ago
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();
Transaction::filter('status', '=', StatusEnum::SUCCESS)->scan();
Instead of doing this, stating the string: Transaction::filter('status', '=', StatusEnum::SUCCESS->value)->scan();
Transaction::filter('status', '=', StatusEnum::SUCCESS->value)->scan();
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.
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();