$file->mediaUrl()
Returns the absolute Url to the file in the public media folder
$file->mediaUrl(string|null $filename = null): string
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $filename | stringornull |
null
|
Optional override for the filename |
Return type
string
This method modifies the existing $file object it is applied to and returns it again.