I use this response in my controller to download file, but I don’t know how to refer to file name/path.
My file is located at storage/app/export/file.txt. But I see download method assume the root is storage/app/public (which is linked to public/storage/).
How can I serve file to download from not public disk ?
You can use the helper function storage_path() to get the path to the storage directory, you can pass it an argument which returns the generates path to that argument relative to the storage directory.
In your own case you would say:
This creates a symbolic link to the storage directory right inside the public folder.
You can access the files in storage directly as if they were in the public folder.