public function setPreferencesAttribute($preferences)
    {
        if (is_array($preferences)) {
            $preferences = json_encode($preferences);
        }

        $this->attributes['preferences'] = $preferences;
    }
public function setPreferencesAttribute($preferences)
    {
        if (is_array($preferences)) {
            $preferences = json_encode($preferences);
        }

        $this->attributes['preferences'] = $preferences;
    }
public function setPreferencesAttribute ( $ preferences ) { if ( is_array ( $ preferences ) ) { $ preferences = json_encode ( $ preferences ) ; } $ this -> attributes [ 'preferences' ] = $ preferences ; }
Set the user's preferences.

@param  string|array  $value

@return void
Set the user s preferences .