'user', '_resource' => 'files', ]; foreach ($this->getAttributes() as $attribute => $value) { switch ($attribute) { case 'user_id': case 'business_id': case 'project_id': case 'disk': case 'original_name': case 'name': case 'extension': case 'mime': case 'size': case 'description': $resource[$attribute] = $value; break; } } return $resource; } }