Update a single key value in a Laravel Illuminate collection
I am building a collection from a Facebook API response. $ads = new IlluminateSupportCollection; if (!$ads->has($insight[$key])) { $ads->put($insight[$key], [ 'ad_id' => $insight[AdsInsightsFields::AD_ID], 'ad_name' => $insight[AdsInsightsFields::AD_NAME], 'ctr' => (float)$insight[AdsInsightsFields::CTR], 'spend' => (float)$insight[AdsInsightsFields::SPEND], ]); } else { // Increment spend value here.…