FormatController – Return results with JSON, CSV, HTML
Published on by Eric L. Barnes
Dan Harper created:
A Laravel Controller which allows you to display report data in multiple formats. For example, you may display a preview as HTML, and offer buttons to download as CSV and JSON.
Eric is the creator of Laravel News and has been covering Laravel since 2012.