$file->download()
Automatically sends all needed headers for the file to be downloaded and echos the file's content
$file->download(string|null $filename = null): string
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $filename | stringornull |
null
|
Optional filename for the download |
Return type
string