original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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
docstring_tokens: This method will try to find the existing of template file