'user', '_resource' => 'businesses', ]; foreach ($this->getAttributes() as $attribute => $value) { switch ($attribute) { case 'name': case 'slug': case 'wallet': case 'files_volume': case 'cache': case 'calculated_at': case 'created_at': case 'updated_at': case 'deleted_at': $resource[$attribute] = $value; break; } } return $resource; } }