php - Indirect modification of overloaded element of User has no effect -


i've looked @ following, haven't been able solve problem: - "indirect modification of overloaded element of splfixedarray has no effect"

i'm using laravel 4 eloquent. access user in database, create following query.

$user = user::find(auth::id())->first(); 

the $user object represented following.

{   "_id": {     "$id": "56b50fe08525cd0d3e9d8dc4"   },   ...   "splits": {     "owned": [],     ...   },   ... } 

i'm trying append string splits->owned array, i'm having error "indirect modification of overloaded property user::$splits has no effect". error raised on third line below.

private function generateusersplits($split) {     $user = user::find(auth::id());     array_push($user->$splits->$owned, $split->id);     $user->save(); } 

$split->id contains string of characters similar "56b50fe08525cd0d3e9d8dc4". i've had browse around stack overflow similar answers, , of yet have had no success.

if provide help, appreciated. thanks


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -