src/View/ViewLoader.php
/**
	 * Resolves a view file given its relative name and returns the absolute path if it exists. Otherwise, returns null.
	 *
	 * @param string $viewFileName
	 * @return string|null
	 */
Resolves a view file given its relative name and returns the absolute path if it exists. Otherwise, returns null.
@param string $viewFileName
@return string|null
Resolves a view file given its relative name and returns the absolute path if it exists . Otherwise returns null . @param string $viewFileName @return string|null
public function resolve($viewFileName) {
		if (file_exists($path = Path::resolve($this->path, $viewFileName)) && !is_dir($path)) {
			return $path;
		}
		if (file_exists($path = Path::resolve($this->path, $viewFileName . '.twig')) && !is_dir($path)) {
			return $path;
		}
		if (file_exists($path = Path::resolve($this->path, $viewFileName . '.blade.php')) && !is_dir($path)) {
			return $path;
		}
		return null;
	}
public function resolve ( $ viewFileName ) { if ( file_exists ( $ path = Path :: resolve ( $ this -> path , $ viewFileName ) ) && ! is_dir ( $ path ) ) { return $ path ; } if ( file_exists ( $ path = Path :: resolve ( $ this -> path , $ viewFileName . '.twig' ) ) && ! is_dir ( $ path ) ) { return $ path ; } if ( file_exists ( $ path = Path :: resolve ( $ this -> path , $ viewFileName . '.blade.php' ) ) && ! is_dir ( $ path ) ) { return $ path ; } return null ; }
Resolves a view file given its relative name and returns the absolute path if it exists.
Resolves a view file given its relative name and returns the absolute path if it exists .
// Resolve the exact file name // Resolve the file name with ".twig" suffix // Resolve the file name with ".blade.php" suffix // No match