Skip to content
Advertisement

Laravel Query. Obtain in Eloquent only totals > 0

I have this query:

With this query I obtain the sum of properties for sale and sum of properties to rent group by property categories. But If some property have only properties for sale and 0 to rent I obtain 0 in sum of rents.

I tried adding:

after groupBy. this hides the rents if they had.

Any idea?

Best regards

Advertisement

Answer

Finally this query works for me:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement