File.toUrl
$file.toUrl() -> $urlTypeString
Description
Get a URL TypeString from a file in the public
or pages
directory.
$imageUrl = file'public:/images/logo.png'.toUrl() //= url'/images/logo.png' $pageUrl = file'app:/code/pages/profile/edit.tht'.toUrl() //= url'/profile/edit'