I have the following Laravel collection:
$sum = $payments->where('status', 'Executed')->pluck('request_text')
request_text is a JSON field that has an amount property inside. Is there a way I can sum all that amount without looping through a json_decode with a foreach? Maybe some method equivalent to pluck but for extracting from JSON?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2S6KUvb
via IFTTT
Aucun commentaire:
Enregistrer un commentaire