Last active
November 30, 2017 15:44
-
-
Save doulmi/f450077cddeeddca7dd42c5fde949553 to your computer and use it in GitHub Desktop.
Laravel download formated json file
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
$aides = Aide::all(); | |
File::put('aides/aides.json', $aides->toJson(JSON_PRETTY_PRINT)); | |
return response()->download('aides/aides.json', 'aides.json'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment