-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[10.x] Illegal operator and value combination whereRelation
with three parameters (where the value is <
)
#51033
Comments
whereRelation
with three parameters (where the value is <
)whereRelation
with three parameters (where the value is <
)
I think you forgot to provide the value for the fourth parameter? https://laravel.com/docs/11.x/eloquent-relationships#inline-relationship-existence-queries |
That's a boolean check, not a greater than comparison. |
@driesvints do you mean that the three parameters can be used only with boolean values? It's very strange! What about this?
|
You're not comparing anything against. To what is it lower than? Can you please try passing the value you want to compare to? |
@driesvints my search value is
Do you understand me? |
Ah I finally see what you mean. Yeah unfortunately you'll have to try something like this:
Does that work? |
Yes I already fixed by this way, but it's not obvious. Maybe we need add some note to the documentation about this? Do you think it's a problem or not? |
I personally think it's pretty obvious, sorry. But you can always attempt to PR the docs. Thanks. |
@driesvints thanks for you response. |
Laravel Version
10.48.7
PHP Version
8.3.3
Database Driver & Version
MySQL 8.0.32
Description
I'm getting an error (Illegal operator and value combination) when use
whereRelation
with three parameters.The interesting thing here is the
$barcode
variable contains the<
character as value for searching.But by the documentation if we are omitting the
operator
then the=
will be used by default.Steps To Reproduce
Call the method
whereRelation
with three parameters where value is<
.The text was updated successfully, but these errors were encountered: