Url.getOrigin
getOrigin() -> string
Description
Get the origin of the Url.
The origin consists of the scheme
, host
, and (if applicable) port
.
$siteUrl = url'http://mysite.com/path/page' $siteUrl.getOrigin() //= 'http://mysite.com'
Get the origin of the Url.
The origin consists of the scheme
, host
, and (if applicable) port
.
$siteUrl = url'http://mysite.com/path/page' $siteUrl.getOrigin() //= 'http://mysite.com'