I need to display a pdf in my website, but I need to keep it out of the public folder and do some validations before showing it.
I was researching a little and now I know that I have to keep it in a folder like storage. But I don´t know how to retrieve it and render it in the browser.
I know that in recent laravel versions you can use response()->file()
to achieve this, inside a controller.
But in the documentation there is no reference to that type of response in older versions of laravel. I need to do it in laravel 5.0.
Edit: i need a solution for older laravel versions as i said, specifically for laravel 5.0. I can´t use newer solutions.