From 6ed891fc0416e8025f929cf60a07b1020118b221 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Thu, 25 Oct 2018 18:53:05 +0200 Subject: Added logout via AuthController --- src/Controllers/AuthController.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/Controllers/AuthController.php (limited to 'src/Controllers') diff --git a/src/Controllers/AuthController.php b/src/Controllers/AuthController.php new file mode 100644 index 00000000..cdaee167 --- /dev/null +++ b/src/Controllers/AuthController.php @@ -0,0 +1,36 @@ +response = $response; + $this->session = $session; + $this->url = $url; + } + + /** + * @return Response + */ + public function logout() + { + $this->session->invalidate(); + + return $this->response->redirectTo($this->url->to('/')); + } +} -- cgit v1.2.3-54-g00ecf