src/Middleware/Dispatcher.php
public function push($middleware)
    {
        if (is_array($middleware)) {
            $this->stack = array_merge($this->stack, $middleware);

            return $this;
        }

        $this->stack[] = $middleware;

        return $this;
    }
public function push($middleware)
    {
        if (is_array($middleware)) {
            $this->stack = array_merge($this->stack, $middleware);

            return $this;
        }

        $this->stack[] = $middleware;

        return $this;
    }
Adds a new middleware or a list of middlewares in the stack.

@param  \Closure|array|object|string $middleware
@return self