$file->mediaRoot()
Returns the absolute path to the file in the public media folder
$file->mediaRoot(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.