public function getLogout() { if (Auth::check()) { Session::delete(Config::get('session.name')); } return Redirect::to('/'); }
/** * Mengecek apakah token yang dikirimkan sama dengan token yang disimpan di session. * * @return string $token * @return bool */ public static function match($token) { $token_name = Config::get('session.token_name'); if (Session::exists($token_name) && $token === Session::get($token_name)) { Session::delete($token_name); return true; } return false; }