Hey thank you for reading and helping me :)
The above Laravel eloquent queries giving different result. Could you tell the difference? I am one step away from pulling my hair .
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (3)
You can view the SQL query using the
toSql()
method insteadcount
.Yes I know, but why it's giving different result?
The idea is that if you compare the SQL that's generated you'll be able to see what they're doing differently underneath their abstraction layer.
If the abstraction layer is giving inconsistent results then it's not a very good tool, but I've heard eloquent is supposed to be decent, so ¯_(ツ)_/¯