Exemple #1
0
 private static function prepareRequestRelations($inputs)
 {
     foreach ($inputs as $key => $val) {
         if (is_array($val)) {
             if (array_get($val, '__type') == 'Pointer') {
                 // convert Pointers to Eloquent Models
                 $inputs[$key] = self::makeModelObject($val['className'])->find($val['objectId']);
             } else {
                 // recursive for Parse Objects
                 $inputs[$key] = SELF::prepareRequestRelations($val);
             }
         }
     }
     return $inputs;
 }