Skip to content

Commit 03d5cb9

Browse files
authored
Merge pull request #80 from elghobaty/master
Use "redirect" helper function to support Lumen's Redirector.
2 parents cf1d2d3 + bdd4790 commit 03d5cb9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/controllers/LogViewerController.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function index()
2727
return Response::download(LaravelLogViewer::pathToLogFile(base64_decode(Request::input('dl'))));
2828
} elseif (Request::has('del')) {
2929
File::delete(LaravelLogViewer::pathToLogFile(base64_decode(Request::input('del'))));
30-
return Redirect::to(Request::url());
30+
return $this->redirect(Request::url());
3131
}
3232

3333
$logs = LaravelLogViewer::all();
@@ -38,4 +38,13 @@ public function index()
3838
'current_file' => LaravelLogViewer::getFileName()
3939
]);
4040
}
41+
42+
private function redirect($to)
43+
{
44+
if (function_exists('redirect')) {
45+
return redirect($to);
46+
}
47+
48+
return Redirect::to($to);
49+
}
4150
}

0 commit comments

Comments
 (0)