File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public function index()
2424 }
2525
2626 if ($ this ->request ->input ('dl ' )) {
27- return response () ->download (LaravelLogViewer::pathToLogFile (base64_decode ($ this ->request ->input ('dl ' ))));
27+ return $ this ->download (LaravelLogViewer::pathToLogFile (base64_decode ($ this ->request ->input ('dl ' ))));
2828 } elseif ($ this ->request ->has ('del ' )) {
2929 app ('files ' )->delete (LaravelLogViewer::pathToLogFile (base64_decode ($ this ->request ->input ('del ' ))));
3030 return $ this ->redirect ($ this ->request ->url ());
@@ -47,4 +47,14 @@ private function redirect($to)
4747
4848 return app ('redirect ' )->to ($ to );
4949 }
50+
51+ private function download ($ data )
52+ {
53+ if (function_exists ('response ' )) {
54+ return response ()->download ($ data );
55+ }
56+
57+ // For laravel 4.2
58+ return app ('\Illuminate\Support\Facades\Response ' )->download ($ data );
59+ }
5060}
You can’t perform that action at this time.
0 commit comments