Yes, you are missing something. The Response::download() first argument is $filePath, i.e a path to an existing file. I'm suspecting that what you pass does not yet exist.
Like DrPrez says, you would have to first create that file. You could use the File::put($filePath, $content); first.
If there is no need for you to store the file on your server, you could return a view or a simple variable as a octet-stream (download). There is many ways to do that and I'm sure you'll find it with Google.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community