protected function pathMatchesSearch($path, $words)
    {
        $path = Str::lower($path);

        foreach ($words as $word) {
            $word = trim($word);
            if (!strlen($word)) {
                continue;
            }

            if (!Str::contains($path, $word)) {
                return false;
            }
        }

        return true;
    }
protected function pathMatchesSearch($path, $words)
    {
        $path = Str::lower($path);

        foreach ($words as $word) {
            $word = trim($word);
            if (!strlen($word)) {
                continue;
            }

            if (!Str::contains($path, $word)) {
                return false;
            }
        }

        return true;
    }
protected function pathMatchesSearch ( $ path , $ words ) { $ path = Str :: lower ( $ path ) ; foreach ( $ words as $ word ) { $ word = trim ( $ word ) ; if ( ! strlen ( $ word ) ) { continue ; } if ( ! Str :: contains ( $ path , $ word ) ) { return false ; } } return true ; }
Determines if file path contains all words form the search term.
@param string $path Specifies a path to examine.
@param array $words A list of words to check against.
@return boolean
Determines if file path contains all words form the search term .