Closed sujit-baniya closed 4 years ago
Because of issue I raised here: https://github.com/spiral/app/issues/21
I tried to implement Session.
Code: HomeController@index
HomeController@index
public function index() { $authSession = $this->session->getSection('auth'); if(empty($authSession->has('token'))) { dump(1); $this->response->redirect($this->router->getRoute('login')->uri()); } }
Here the $authSession->has('token') is empty but not redirecting to login.
$authSession->has('token')
But redirecting is working from LoginController: https://storyxpress.co/video/k8y3f79by43739kwh
Why is it happening? Any solution for this?
Because of issue I raised here: https://github.com/spiral/app/issues/21
I tried to implement Session.
Code:
HomeController@index
Here the
$authSession->has('token')
is empty but not redirecting to login.But redirecting is working from LoginController: https://storyxpress.co/video/k8y3f79by43739kwh
Why is it happening? Any solution for this?