From cca29bcdfef0ed8989418c2c9be6d78af13bca0c Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 29 Sep 2017 16:53:09 +0200 Subject: [PATCH] Take redirect uri from controller class. --- app/Http/Controllers/Controller.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 843c7bc8bd..87f254a110 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -44,6 +44,8 @@ class Controller extends BaseController protected $monthAndDayFormat; /** @var string */ protected $monthFormat; + /** @var string */ + protected $redirectUri = '/'; /** * Controller constructor. @@ -116,10 +118,10 @@ class Controller extends BaseController { $uri = strval(session($identifier)); if (!(strpos($identifier, 'delete') === false) && !(strpos($uri, '/show/') === false)) { - $uri = route('index'); + $uri = $this->redirectUri; } if (!(strpos($uri, 'jscript') === false)) { - $uri = route('index'); + $uri = $this->redirectUri; } return $uri;