Skip to content

Commit 52c2a39

Browse files
sarahmanSyed Abidur Rahman
andauthored
Redirection after cleaning a log file is done to the previous url. (#218)
Co-authored-by: Syed Abidur Rahman <[email protected]>
1 parent c764996 commit 52c2a39

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/controllers/LogViewerController.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
class LogViewerController extends BaseController
1313
{
1414
/**
15-
* @var
15+
* @var \Illuminate\Http\Request
1616
*/
1717
protected $request;
18+
1819
/**
1920
* @var LaravelLogViewer
2021
*/
@@ -24,7 +25,7 @@ class LogViewerController extends BaseController
2425
* @var string
2526
*/
2627
protected $view_log = 'laravel-log-viewer::log';
27-
28+
2829
/**
2930
* LogViewerController constructor.
3031
*/
@@ -91,7 +92,7 @@ private function earlyReturn()
9192
return $this->download($this->pathFromInput('dl'));
9293
} elseif ($this->request->has('clean')) {
9394
app('files')->put($this->pathFromInput('clean'), '');
94-
return $this->redirect($this->request->url());
95+
return $this->redirect(url()->previous());
9596
} elseif ($this->request->has('del')) {
9697
app('files')->delete($this->pathFromInput('del'));
9798
return $this->redirect($this->request->url());

0 commit comments

Comments
 (0)