public function isExcludedPath($excludedPaths)
    {
        $request = new HttpRequest();
        $basePath = $request->getQuery('_url');

        if (is_null($excludedPaths)) {
            $excludedPaths = [];
        } elseif ($excludedPaths instanceof Config) {
            $excludedPaths = $excludedPaths->toArray();
        } else {
            $excludedPaths = (array)$excludedPaths;
        }

        foreach ($excludedPaths as $key => $value) {
            if (substr($basePath, 0, strlen($value)) == $value && $value != '/') {
                return true;
            }
        }

        return false;
    }
public function isExcludedPath($excludedPaths)
    {
        $request = new HttpRequest();
        $basePath = $request->getQuery('_url');

        if (is_null($excludedPaths)) {
            $excludedPaths = [];
        } elseif ($excludedPaths instanceof Config) {
            $excludedPaths = $excludedPaths->toArray();
        } else {
            $excludedPaths = (array)$excludedPaths;
        }

        foreach ($excludedPaths as $key => $value) {
            if (substr($basePath, 0, strlen($value)) == $value && $value != '/') {
                return true;
            }
        }

        return false;
    }
public function isExcludedPath ( $ excludedPaths ) { $ request = new HttpRequest ( ) ; $ basePath = $ request -> getQuery ( '_url' ) ; if ( is_null ( $ excludedPaths ) ) { $ excludedPaths = [ ] ; } elseif ( $ excludedPaths instanceof Config ) { $ excludedPaths = $ excludedPaths -> toArray ( ) ; } else { $ excludedPaths = ( array ) $ excludedPaths ; } foreach ( $ excludedPaths as $ key => $ value ) { if ( substr ( $ basePath , 0 , strlen ( $ value ) ) == $ value && $ value != '/' ) { return true ; } } return false ; }
check if path is excluded from middleware
@author Adeyemi Olaoye <yemi@cottacush.com>
@param array $excludedPaths
@return bool
check if path is excluded from middleware