protected function parseAction($action)
    {
        if (\is_string($action)) {
            return ['uses' => $action];
        } elseif (! \is_array($action)) {
            return [$action];
        }

        if (isset($action['middleware']) && \is_string($action['middleware'])) {
            $action['middleware'] = \explode('|', $action['middleware']);
        }

        return $action;
    }