Convert the model to an array

@return array
348388
public function toArray()
	{
		$output = $this->getAttributes();

		foreach ($this->relationships as $key => $value) {

			if ($value instanceof BaseModel) {
				$value = array($value->getSingularEntityName() => $value->toArray());
			}
			else {
				$value = $value->toArray();
			}

			$output = array_merge($output, $value);
		}

		return $output;
	}
829665
public function toArray()
    {
        return [
            'message' => $this->getMessageException(),
            'errors' => $this->getErrors(),
            'debugCode' => $this->getDebugCode(),
            'details' => $this->getDetails(),
            'routeBack' => redirect()->back()->getTargetUrl()
        ];
    }
96995
public function toArray(){
        $ModelArray = [];
        foreach( get_object_vars( $this) as $propertyName => $propertyValue){
            if( is_subclass_of( $propertyValue, Model::class)){
                /** @var $propertyValue Model */
                $ModelArray[$propertyName] = $propertyValue->toArray();
            } else {
                $ModelArray[$propertyName] = $propertyValue;
            }
        }
        return $ModelArray;
    }
482631
public function toArray()
    {
        $fieldValues = [];
        foreach ($this->fieldsets as $fieldset) {
            $fieldValues = array_merge($fieldValues, $fieldset->toArray());
        }
        return $fieldValues;
    }
958859
public function toArray()
	{
		return [
			'name' => SerializationHelper::stringOrNull($this->name),
			'cmt' => SerializationHelper::stringOrNull($this->comment),
			'desc' => SerializationHelper::stringOrNull($this->description),
			'src' => SerializationHelper::stringOrNull($this->source),
			'link' => SerializationHelper::serialize($this->links),
			'number' => SerializationHelper::integerOrNull($this->number),
			'type' => SerializationHelper::stringOrNull($this->type),
			'extensions' => SerializationHelper::serialize($this->extensions),
			'rtep' => SerializationHelper::serialize($this->points),
			'stats' => SerializationHelper::serialize($this->stats)
		];
	}
115424
public function toArray(): array
    {
        $data = array_filter([
            'id'     => $this->id,
            'status' => $this->status,
            'code'   => $this->code,
            'title'  => $this->title,
            'detail' => $this->detail
        ]);

        if ($this->hasLinks()) {
            $data['links'] = $this->linksToArray();
        }

        if ($this->hasMetadata()) {
            $data['meta'] = $this->getMetadata();
        }

        return $data;
    }
1327190
public function toArray(): array
    {
        return [
            'type' => $this->type,
            'configuration' => $this->configuration,
            'weight' => $this->weight,
            'score_mode' => $this->scoreMode,
            'filter' => ($this->filter instanceof Filter
                ? $this
                    ->filter
                    ->toArray()
                : null),
        ];
    }
474237
public function toArray()
    {
        $cartItemData = [
            'modelType' => $this->modelType,
            'modelId' => $this->modelId,
            'name' => $this->name,
            'price' => $this->price,
            'image' => $this->image,
            'quantity' => $this->quantity,
        ];

        if ($this->id) {
            $cartItemData['id'] = $this->id;
        }

        return $cartItemData;
    }
815498
public function toArray()
    {
        $result = [];

        if (!empty($this->name) && empty($this->version)) {
            return $this->name;
        }

        if (!empty($this->name)) {
            $result['name'] = $this->name;
        }

        if (!empty($this->version)) {
            $result['version'] = $this->version->toArray();
        }

        return $result;
    }
896238
public function toArray() {
        return array_map(function($value) {
            return ($value instanceof Arrayable) ? $value->toArray() : $value;
        }, $this->_attributes);
    }
377064
public function toArray()
    {
        return array_map(
            function ($value) {
                return $value instanceof Entity ? $value->toArray() : $value;

            }, $this->items
        );
    }
211490
public function toArray() {
		return [
			'key' => $this->key(),
			'url' => $this->url(),
			'formData' => $this->formData(),
			'cacheControl' => $this->cacheControl(),
			'expires' => $this->expires(),
			'acl' => $this->acl()
		];
	}
119698
public function toArray()
	{
		return
			[
				"id" => $this->id,
				"name" => $this->name,
				"title" => $this->title,
				"route" => $this->route,
				"support" => $this->support,
				"version" => $this->version,
				"data" => $this->data,
				"key" => $this->key,
				"name_space" => $this->name_space,
				"path" => $this->path,
			];
	}
478837
public function toArray()
    {
        $result = [];

        if (!empty($this->name)) {
            $result['name'] = $this->name;
        }
        
        if (!empty($this->version)) {
            $result['version'] = $this->version->toArray();
        }

        if (isset($result['version']) && empty($result['version'])) {
            unset($result['version']);
        }

        return $result;
    }
31035
public function __toArray()
    {
        $data = array();

        foreach (static::schema() as $field => $options) {
            $data[$field] = $this->{$field};
        }

        return $data;
    }
1103932
public function toArray()
    {
        return array(
            static::FIELD_NAME => $this->_name,
            static::FIELD_DESCRIPTION => $this->_description,
            static::FIELD_ITEM_NUMBER => $this->_itemNumber,
            static::FIELD_AMOUNT => $this->_amount,
            static::FIELD_QUANTITY => $this->_quantity,
            static::FIELD_URL => $this->_url,
        );
    }
59962
public function toArray()
    {
        $a = array();
        foreach ($this->value as $key => $value) {
            $a[$key] = $value->toArray();
        }
        return $a;
    }