/** * We will destroy current user session and return to * application base url */ public function logout($redirect = true) { Session::delete(); $redirect ? Url::redirectTo(Url::getBase()) : ''; }
/** * @param string $uri * @param string $type * @param int $httpResponseCode * * @return $this */ protected function redirectTo($uri = '', $type = 'location', $httpResponseCode = 302) { Url::redirectTo($uri, $type, $httpResponseCode); return $this; }