How to make Grav send a file as a download

I want to make a button that, when clicked, will send a download file of relevant data. I know you can do this in PHP - is there a way to it in Grav, or maybe an existing plugin, or will I have to write my own plugin?