public function add($middleware)
    {
        if (is_array($middleware)) {
            $this->queue = array_merge($this->queue, $middleware);

            return $this;
        }
        $this->queue[] = $middleware;

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

            return $this;
        }
        $this->queue[] = $middleware;

        return $this;
    }
public function add ( $ middleware ) { if ( is_array ( $ middleware ) ) { $ this -> queue = array_merge ( $ this -> queue , $ middleware ) ; return $ this ; } $ this -> queue [ ] = $ middleware ; return $ this ; }
Append a middleware callable to the end of the queue.

@param callable|string|array $middleware The middleware(s) to append.
@return $this
Append a middleware callable to the end of the queue .