It builds syncData

@param array $input Validated input

@return mixed
7936
protected function buildSyncData(array $input)
    {
        $syncData = [];
        foreach ($input['data'] as $item) {
            $syncData[$item['id']] = ['weight' => isset($item['weight']) ? $item['weight'] : 0];
        }
        return $syncData;
    }
939596
protected function authenticate(array $input)
    {
        $remember = (($input['remember'] ?? 'no') === 'yes');

        $data = Arr::except($input, ['remember']);

        // We should now attempt to login the user using Auth class. If this
        // failed simply return false.
        return $this->auth->attempt($data, $remember);
    }
722259
public static function fromArray($input = [])
	{
		$fields = ScalarFields::getInstance();

		foreach ($input as $k => $v) {
			if (is_array($v)) {
				$fields = $fields->appendFields($k, self::fromArray($v));
			} elseif (!!$v) {
				$fields = $fields->appendField($k);
			}
		}

		return $fields;
	}
75255
public function create(array $input)
    {
        $input = $this->onlyFillable($input);

        return $this->modelInstance->create($input);
    }
716416
public function getValidator(array $input)
    {
        if (!array_key_exists($this->column, $input)) {
            return false;
        }

        $input = array_only($input, $this->column);

        $form = $this->buildNestedForm($this->column, $this->builder);

        $rules = $attributes = [];

        /* @var Field $field */
        foreach ($form->fields() as $field) {
            if (!$fieldRules = $field->getRules()) {
                continue;
            }

            $column = $field->column();

            if (is_array($column)) {
                foreach ($column as $key => $name) {
                    $rules[$name.$key] = $fieldRules;
                }

                $this->resetInputKey($input, $column);
            } else {
                $rules[$column] = $fieldRules;
            }

            $attributes = array_merge(
                $attributes,
                $this->formatValidationAttribute($input, $field->label(), $column)
            );
        }

        array_forget($rules, NestedForm::REMOVE_FLAG_NAME);

        if (empty($rules)) {
            return false;
        }

        $newRules = [];

        foreach ($rules as $column => $rule) {
            foreach (array_keys($input[$this->column]) as $key) {
                $newRules["{$this->column}.$key.$column"] = $rule;
            }
        }

        return Validator::make($input, $newRules, $this->validationMessages, $attributes);
    }
733148
protected function validate($input)
    {
        if (true === is_string($input)) {
            $input = @json_decode($input, true);
            if (json_last_error() !== JSON_ERROR_NONE) {
                $input = false;
            }
        }

        return $input;
    }
118260
public function withInput(array $input = null)
    {
        $input = $input ?: $this->request->input();

        $this->session->flashInput(array_filter($input, function ($value)
        {
            return ! $value instanceof SymfonyUploadedFile;
        }));

        return $this;
    }
1179058
protected function encode(array $input)
	{
		// Detect the request content type, default to 'text/plain'
		$content_type = isset($this->headers['Content-Type']) ? $this->headers['Content-Type'] : $this->response_info('content_type', 'text/plain');

		// Get the correct format for the current content type
		$format = \Arr::key_exists(static::$auto_detect_formats, $content_type) ? static::$auto_detect_formats[$content_type] : null;

		switch($format)
		{
			// Format as XML
			case 'xml':
					/**
					 * If the input array has one item in the top level
					 * then use that item as the root XML element.
					 */
					if(count($input) === 1)
					{
						$base_node = key($input);
						return \Format::forge($input[$base_node])->to_xml(null, null, $base_node);
					}
					else
					{
						return \Format::forge($input)->to_xml();
					}
				break;

			// Format as JSON
			case 'json':
					return \Format::forge($input)->to_json();
				break;

			// Format as PHP Serialized Array
			case 'serialize':
					return \Format::forge($input)->to_serialize();
				break;

			// Format as PHP Array
			case 'php':
					return \Format::forge($input)->to_php();
				break;

			// Format as CSV
			case 'csv':
					return \Format::forge($input)->to_csv();
				break;

			// Format as Query String
			default:
					return http_build_query($input, null, '&');
				break;
		}
	}
1189662
public function initialFormData($input)
    {
        if (is_array($input) && isset($input['id'])) {
            return IDEncoder::decode($input['id']);
        }

        return null;
    }
1035784
public function sanitizeInput(array $input)
    {
        return $input = collect($input)->reject(function ($value) {
            return is_null($value) || empty($value);
        })->toArray();
    }
1283187
public static function toArray($input = false) {

        if ($input) {

            switch (Data::type($input)) {
                case 'array':
                    $array = $input;
                    break;
                case 'object':
                    $array = self::arrayToObject($input);
                    break;
            }

            if (Validate::isObject($input)) {

                return $input;
            }
        }

        return false;
    }
405878
protected function clean_input( array $input ) {
		foreach ( $input as $key => $value ) {
			if ( is_array( $value ) ) {
				$input[ $key ] = $this->clean_input( $value );
			}

			if ( $value instanceof UploadedFile ) {
				unset( $input[ $key ] );
			}
		}

		return $input;
	}
1194248
protected function removeFilesFromInput(array $input)
    {
        foreach ($input as $key => $value) {
            if (is_array($value)) {
                $input[$key] = $this->removeFilesFromInput($value);
            }

            if ($value instanceof SymfonyUploadedFile) {
                unset($input[$key]);
            }
        }

        return $input;
    }
1284450
protected function cleanInputData(array $input)
    {
        $columns = $this->getColumns();
        foreach ($columns as $column) {
            if (!isset($input[$column])) {
                $input[$column] = '';
            }
        }
        return $input;
    }
310194
public static function build($input = null) : Response
    {
        //Is a response object already
        if ($input instanceof Response) {
            return $input;
        }

        $response = new Response();

        //View
        if ($input instanceof View) {
            $response->setBody($input->draw());
        }

        //Json
        if ($input instanceof ConvertsToJson) {
            self::createFromJsonable($response, $input);
        }

        //Array
        if (is_array($input)) {
            self::createFromArray($response, $input);
        }

        //String
        if (is_string($input)) {
            $response->setBody($input);
        }

        return $response;
    }
179293
public function check(array $input)
    {
        $result = $this->spec->check($input);

        return new SpecResult(
            $result->getMissing(),
            Arr::walkCopy(
                $result->getFailed(),
                function ($key, $value, &$array, $path) {
                    $array[$key] = Std::coalesce(
                        Std::firstBias(
                            Arr::dotGet(
                                $this->messages,
                                Std::nonempty($path, $key)
                            ) !== null,
                            [Arr::dotGet(
                                $this->messages,
                                Std::nonempty($path, $key)
                            )],
                            null
                        ),
                        Std::firstBias(
                            $value instanceof AbstractConstraint,
                            function () use ($value) {
                                return $value->getDescription();
                            },
                            null
                        ),
                        Std::firstBias(
                            is_array($value),
                            function () use ($value) {
                                return array_map(
                                    function (AbstractConstraint $item) {
                                        return $item->getDescription();
                                    },
                                    $value
                                );
                            },
                            $value
                        )
                    );
                },
                true,
                '',
                false
            ),
            $result->getStatus()
        );
    }
543796
public function validate($input): bool
    {
        if (!\is_array($input)) {
            return false;
        }
        $filtered = array_filter($input, $this->callback);
        return \count($input) === \count($filtered);
    }