예제 #1
0
 public function handleProviderCallback()
 {
     $char = Socialize::with('eveonline')->user();
     try {
         $user = User::where('char_id', $char->id)->firstOrFail();
     } catch (ModelNotFoundException $e) {
         $user = User::createAndFill(['char_id' => $char->id, 'char_name' => $char->name, 'password' => Userbot::generatePassword(16), 'next_check' => \Carbon\Carbon::now('UTC')]);
     }
     Auth::login($user, true);
     return redirect('home');
 }