I have a pdf file inside the documents folder of my user, which I need to return through a route. For this I wrote the following simple function
public function showPdf(){
return response()->file('/home/victor/Documents/1-39-1.pdf');
}
But when I call this function through a GET, the browser returns the following exception
Method Laravel\Lumen\Http\ResponseFactory::file does not exist.
How can I tell lumen that my file is on that path?