Skip to content

Commit

Permalink
Redirection after cleaning a log file is done to the previous url. (#218
Browse files Browse the repository at this point in the history
)

Co-authored-by: Syed Abidur Rahman <[email protected]>
  • Loading branch information
sarahman and Syed Abidur Rahman authored Apr 22, 2020
1 parent c764996 commit 52c2a39
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/controllers/LogViewerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
class LogViewerController extends BaseController
{
/**
* @var
* @var \Illuminate\Http\Request
*/
protected $request;

/**
* @var LaravelLogViewer
*/
Expand All @@ -24,7 +25,7 @@ class LogViewerController extends BaseController
* @var string
*/
protected $view_log = 'laravel-log-viewer::log';

/**
* LogViewerController constructor.
*/
Expand Down Expand Up @@ -91,7 +92,7 @@ private function earlyReturn()
return $this->download($this->pathFromInput('dl'));
} elseif ($this->request->has('clean')) {
app('files')->put($this->pathFromInput('clean'), '');
return $this->redirect($this->request->url());
return $this->redirect(url()->previous());
} elseif ($this->request->has('del')) {
app('files')->delete($this->pathFromInput('del'));
return $this->redirect($this->request->url());
Expand Down

0 comments on commit 52c2a39

Please sign in to comment.