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;
    }
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;
    }
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 ; }
Parse the action into an array format.

@param  mixed  $action

@return array
Parse the action into an array format .