/** @param IlluminateHttpRequest $request
* @return IlluminateAuthAccessResponse */
public function download(Request $request)
{
$file = public_path(). "/images/test.jpg";
$headers = ['Content-Type: image/jpeg'];
if (file_exists($file)) {
return Response::download($file, 'plugin.jpg', $headers);
} else {
echo('File not found.');
}
}