I'm creating a login session, when I check the login session in ControllerBase to return to the login page, the page is not working error.
class ControllerBase extends Controller
{
public function initialize()
{
$session = $this->session;
if(!$session->has('auth')) {
return $this->response->redirect('user/login');
}
}
}