Alexmg86/laravel-sub-query

withSum returns string instead of number

HugoHeneault opened this issue ยท 3 comments

Hi there! Thanks for your great package.

When using ::withSum I'm getting a String value instead of a Number one. Any ideas?

Thanks a lot! ๐Ÿ‘

Hello!
yes, I think I will be able to add such an opportunity in the near future

Hi!
I added this feature in the latest version 1.9.4. The resulting value can be casting through the third parameter.

Invoice::withSum('items:price:signed')->get();

Awesome! Thanks! ๐Ÿ‘