protected function findInPaths($name, array $paths)
    {
        foreach ($paths as $path) {
            foreach ($this->getPossibleFiles($name) as $file) {

                if ($this->fs->exists($viewPath = $path.'/'.$file)) {
                    return $viewPath;
                }

            }
        }

        throw new InvalidArgumentException("Resource '$name' not found.");
    }
protected function findInPaths($name, array $paths)
    {
        foreach ($paths as $path) {
            foreach ($this->getPossibleFiles($name) as $file) {

                if ($this->fs->exists($viewPath = $path.'/'.$file)) {
                    return $viewPath;
                }

            }
        }

        throw new InvalidArgumentException("Resource '$name' not found.");
    }
protected function findInPaths ( $ name , array $ paths ) { foreach ( $ paths as $ path ) { foreach ( $ this -> getPossibleFiles ( $ name ) as $ file ) { if ( $ this -> fs -> exists ( $ viewPath = $ path . '/' . $ file ) ) { return $ viewPath ; } } } throw new InvalidArgumentException ( "Resource '$name' not found." ) ; }
Find the file in the possible paths

@param  string $name
@param  array  $paths
@throws InvalidArgumentException
@return string Path the the view
Find the file in the possible paths