public function resolve($path)
    {
        $path = str_replace('/', '.', preg_replace('/\/:\w+/', '', $path));

        $finder = $this->container['view.finder'];

        try {
            $finder->find($path);
        } catch (InvalidArgumentException $e) {
            $explodedPath = explode('.', $path);


            if ($explodedPath[0] === 'static') {
                return null;
            }

            if (count($explodedPath) > 1) {
                $explodedPath[0] = 'shared';
                $explodedPath = array('shared', end($explodedPath));
                try {
                    $finder->find(implode('.', $explodedPath));
                    $path = implode('.', $explodedPath);
                } catch (InvalidArgumentException $e) {
                    $this->app->error($e);
                }
            }
        }

        return $path;
    }
public function resolve($path)
    {
        $path = str_replace('/', '.', preg_replace('/\/:\w+/', '', $path));

        $finder = $this->container['view.finder'];

        try {
            $finder->find($path);
        } catch (InvalidArgumentException $e) {
            $explodedPath = explode('.', $path);


            if ($explodedPath[0] === 'static') {
                return null;
            }

            if (count($explodedPath) > 1) {
                $explodedPath[0] = 'shared';
                $explodedPath = array('shared', end($explodedPath));
                try {
                    $finder->find(implode('.', $explodedPath));
                    $path = implode('.', $explodedPath);
                } catch (InvalidArgumentException $e) {
                    $this->app->error($e);
                }
            }
        }

        return $path;
    }
public function resolve ( $ path ) { $ path = str_replace ( '/' , '.' , preg_replace ( '/\/:\w+/' , '' , $ path ) ) ; $ finder = $ this -> container [ 'view.finder' ] ; try { $ finder -> find ( $ path ) ; } catch ( InvalidArgumentException $ e ) { $ explodedPath = explode ( '.' , $ path ) ; if ( $ explodedPath [ 0 ] === 'static' ) { return null ; } if ( count ( $ explodedPath ) > 1 ) { $ explodedPath [ 0 ] = 'shared' ; $ explodedPath = array ( 'shared' , end ( $ explodedPath ) ) ; try { $ finder -> find ( implode ( '.' , $ explodedPath ) ) ; $ path = implode ( '.' , $ explodedPath ) ; } catch ( InvalidArgumentException $ e ) { $ this -> app -> error ( $ e ) ; } } } return $ path ; }
This method will try to find the existing of template file

@param string $path The relative template path

@return string
@throws InvalidArgumentException If we cannot find view
This method will try to find the existing of template file