title: How to stream download data from current view in Laravel 5.7
body: <p>I am making a basic database application that allows users to submit search parameters through a form and have the results displayed in a view. I create a query from an Eloquent model, paginate, and then send the results to a view.</p>
  
  <p>I would like to place a link on the results view that lets users download the results of their query in a csv file, but stream the data rather than create a file and then serve it. My problem is that I don't know how to pass the query from the results page through a route to another controller that handles the download.</p>
  
  <p>The information I have found about sending data to a route involves sending parameters for a url which I am not sure helps me.</p>
  
  <p>I was thinking I could cache the results by sending the data from the controller handling the query to the controller handling the download before sending it to a view, but I am not sure how to accomplish this or if Laravel provides a better way to do what I want.</p>