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

whereRelation doesn't work with enum #40994

Closed
develgold opened this issue Feb 14, 2022 · 1 comment
Closed

whereRelation doesn't work with enum #40994

develgold opened this issue Feb 14, 2022 · 1 comment

Comments

@develgold
Copy link
Contributor

  • Laravel Version: 9.0.2
  • PHP Version: 8.1.0
  • Database Driver & Version: Postgresql 13

Description:

whereRelation doesn't work with enum

Steps To Reproduce:

Product::whereRelation('category', 'status', CategoryStatus::active)->get()
TypeError: strtolower(): Argument #1 ($string) must be of type string, App\Enums\CategoryStatus given

@driesvints
Copy link
Member

Indeed, this isn't supported (yet).

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