public function prependMiddleware($middleware)
    {
        if (array_search($middleware, $this->middleware) === false) {
            array_unshift($this->middleware, $middleware);
        }

        return $this;
    }
public function prependMiddleware($middleware)
    {
        if (array_search($middleware, $this->middleware) === false) {
            array_unshift($this->middleware, $middleware);
        }

        return $this;
    }
public function prependMiddleware ( $ middleware ) { if ( array_search ( $ middleware , $ this -> middleware ) === false ) { array_unshift ( $ this -> middleware , $ middleware ) ; } return $ this ; }
Add a new middleware to beginning of the stack if it does not already exist.

@param  string  $middleware
@return $this
Add a new middleware to beginning of the stack if it does not already exist .