Skip to content
Advertisement

Laravel returns Indirect modification of overloaded element of AppMatch has no effect when pushing new key

I’m having an issue when adding/pushing new key value to the result data, it return Indirect modification of overloaded element of AppMatch.

$results[$key][‘competitors’][1]->teamScore = $results[$key][‘competitors’][0]->scoreString;

Model Match method

JavaScript

Advertisement

Answer

Replace array push like this,

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