Last active
August 29, 2015 14:07
-
-
Save marchampson/a733883a0a9f3112151d to your computer and use it in GitHub Desktop.
Laravel download respsonse type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// app/routes.php | |
Route::get('file/download', function() | |
{ | |
$file = 'path_to_my_file.pdf'; | |
return Response::download($file, 418, array('iron', 'man')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment