Session variable is not cleared when downloading a file
Hi all,
I'm running Laravel 5.4 and "maatwebsite/excel": "~2.1.0" to provide a CSV download. The content of the download is controlled by a session variable. Everything is set up and is working beautifully. Except one issue:
the session variable is not cleared
The documentation states:
For example, the "session" middleware included with Laravel writes the session data to storage after the response has been sent to the browser. If you define a terminate method on your middleware, it will automatically be called after the response is sent to the browser.