src/Menu/Http/Controllers/Admin/MenuController.php
protected function processInput(Request $request, Router $router)
    {
        $type = $request->input('type');
        $target = $request->input('target.'.$type);
        $params = null;

        if ($type == Menu::TYPE_ROUTE) {
            // If we got a route type we have to do
            // some preprocessing with the input

            // TODO check the target select input so that we do not have to convert it back everytime
            $target = array_keys($this->prepareRoutes($router))[$target];
            if (array_key_exists($target, $parameter = $request->input('parameters'))) {
                // If we found a parameter map to the given route
                // we store them inside the database.
                $params = $parameter[$target];
            }
        }

        return $request->only(['visible', 'published_at', 'concealed_at']) + [
            'type'       => $type,
            'target'     => $target,
            'parameters' => $params,
        ];
    }
protected function processInput(Request $request, Router $router)
    {
        $type = $request->input('type');
        $target = $request->input('target.'.$type);
        $params = null;

        if ($type == Menu::TYPE_ROUTE) {
            // If we got a route type we have to do
            // some preprocessing with the input

            // TODO check the target select input so that we do not have to convert it back everytime
            $target = array_keys($this->prepareRoutes($router))[$target];
            if (array_key_exists($target, $parameter = $request->input('parameters'))) {
                // If we found a parameter map to the given route
                // we store them inside the database.
                $params = $parameter[$target];
            }
        }

        return $request->only(['visible', 'published_at', 'concealed_at']) + [
            'type'       => $type,
            'target'     => $target,
            'parameters' => $params,
        ];
    }
@param Request $request
@param Router  $router

@return array