I only know to do this using headers such as below example.
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($zip_file));
header('Content-Length: ' . filesize($zip_file));
Is there a framework that does this better? I been looking at the https://packagist.org but couldnt find anything.