protected function parseMiddleware($middleware)
    {
        list($name, $parameters) = array_pad(explode(':', $middleware, 2), 2, array());

        if (is_string($parameters)) {
            $parameters = explode(',', $parameters);
        }

        return array($name, $parameters);
    }
protected function parseMiddleware($middleware)
    {
        list($name, $parameters) = array_pad(explode(':', $middleware, 2), 2, array());

        if (is_string($parameters)) {
            $parameters = explode(',', $parameters);
        }

        return array($name, $parameters);
    }
protected function parseMiddleware ( $ middleware ) { list ( $ name , $ parameters ) = array_pad ( explode ( ':' , $ middleware , 2 ) , 2 , array ( ) ) ; if ( is_string ( $ parameters ) ) { $ parameters = explode ( ',' , $ parameters ) ; } return array ( $ name , $ parameters ) ; }
Parse a middleware string to get the name and parameters.

@param  string  $middleware
@return array
Parse a middleware string to get the name and parameters .