Feature or bug? ->loadCount returns snake cased and ->withCount returns relName_count #52038
Answered
by
bulletproof-coding
bulletproof-coding
asked this question in
General
-
When I list a resource and I use withCount on the builder, the result is relName_count, Both don't take into consideration the model's Also the relations are snake cased when ->with is used on the builder, if in model |
Beta Was this translation helpful? Give feedback.
Answered by
bulletproof-coding
Jul 9, 2024
Replies: 1 comment
-
I was using withCount('relationName as relationName_count') that is why it returned like that. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
bulletproof-coding
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was using withCount('relationName as relationName_count') that is why it returned like that.