Example #1
0
 private static function newCookie($user)
 {
     $cv = str_random(32);
     $cookie = Cookie::forever('laravel-remember', $cv);
     $uc = new UserCookie();
     $uc->user_id = $user->id;
     $uc->cookie = $cv;
     $uc->save();
     return $cookie;
 }
Example #2
0
 function get()
 {
     $url = '/';
     Auth::logout();
     UserCookie::where('cookie', '=', Request::cookie('laravel-remember'))->delete();
     if (Config::get('punto-cms.c2go-login') === true) {
         $url = 'https://sso.communitytogo.com.au/logout';
         if (Config::get('punto-cms.c2go-redirect-logout') !== null) {
             $url = Config::get('punto-cms.c2go-redirect-logout');
         }
     }
     return Redirect::to($url)->withCookie(Cookie::forget('remember'))->withCookie(Cookie::forget('laravel-remember'));
 }