src/Foundation/Application.php
/**
	 * Returns a path to an asset in the `public` folder intended for use in link, script, and image references on
	 * the outputted pages.
	 *
	 * @param string $relativePath
	 * @return string
	 */
Returns a path to an asset in the `public` folder intended for use in link, script, and image references on
the outputted pages.

@param string $relativePath
@return string
Returns a path to an asset in the ` public ` folder intended for use in link script and image references on the outputted pages . @param string $relativePath @return string
public static function asset($relativePath = '') {
		$relativePath = trim($relativePath, '/');
		$root = trim($_SERVER['SUBDIRECTORY'], '/');
		if (Application::routing() === 'legacy') {
			$uri = trim(config('app.paths.assets_legacy', ''), '/');
			$path = Path::join('/', $root, $uri, $relativePath);
			$path = str_replace('\\', '/', $path);
			return $path;
		}
		$uri = trim(config('app.paths.assets', ''), '/');
		$path = Path::join('/', $root, $uri, $relativePath);
		$path = str_replace('\\', '/', $path);
		return $path;
	}
public static function asset ( $ relativePath = '' ) { $ relativePath = trim ( $ relativePath , '/' ) ; $ root = trim ( $ _SERVER [ 'SUBDIRECTORY' ] , '/' ) ; if ( Application :: routing ( ) === 'legacy' ) { $ uri = trim ( config ( 'app.paths.assets_legacy' , '' ) , '/' ) ; $ path = Path :: join ( '/' , $ root , $ uri , $ relativePath ) ; $ path = str_replace ( '\\' , '/' , $ path ) ; return $ path ; } $ uri = trim ( config ( 'app.paths.assets' , '' ) , '/' ) ; $ path = Path :: join ( '/' , $ root , $ uri , $ relativePath ) ; $ path = str_replace ( '\\' , '/' , $ path ) ; return $ path ; }
Returns a path to an asset in the `public` folder intended for use in link, script, and image references on
 the outputted pages.
Returns a path to an asset in the ` public ` folder intended for use in link script and image references on the outputted pages .