Take redirect uri from controller class.

This commit is contained in:
James Cole
2017-09-29 16:53:09 +02:00
parent 40f2659b91
commit cca29bcdfe

View File

@@ -44,6 +44,8 @@ class Controller extends BaseController
protected $monthAndDayFormat; protected $monthAndDayFormat;
/** @var string */ /** @var string */
protected $monthFormat; protected $monthFormat;
/** @var string */
protected $redirectUri = '/';
/** /**
* Controller constructor. * Controller constructor.
@@ -116,10 +118,10 @@ class Controller extends BaseController
{ {
$uri = strval(session($identifier)); $uri = strval(session($identifier));
if (!(strpos($identifier, 'delete') === false) && !(strpos($uri, '/show/') === false)) { if (!(strpos($identifier, 'delete') === false) && !(strpos($uri, '/show/') === false)) {
$uri = route('index'); $uri = $this->redirectUri;
} }
if (!(strpos($uri, 'jscript') === false)) { if (!(strpos($uri, 'jscript') === false)) {
$uri = route('index'); $uri = $this->redirectUri;
} }
return $uri; return $uri;