public function handleProviderCallback($provider)
 {
     $socUser = Socialite::driver($provider)->user();
     $user = User::where('idsocial', $socUser->getId())->first();
     if (!$user) {
         $user = new User();
         $user->idsocial = $socUser->getId();
         $user->social = "facebook";
         $user->avatar = $socUser->getAvatar();
         $user->name = $socUser->getName();
         $user->email = $socUser->getEmail();
         $user->plans_id = 1;
         $user->typeuser_id = 2;
         $user->password = bcrypt(str_random(10));
         $user->save();
         return redirect()->intended();
         \Event::fire(new UsuarioInserido($user));
     }
     auth()->login($user);
     return redirect()->intended();
 }
 public function usuariosSemAnuncio()
 {
     // $adverts = User::where('password', null)->count();
     // dd($adverts);
     $advertsTotal = 1445000;
     $aaa = 0;
     $conta = 1;
     while ($conta < $advertsTotal) {
         $termino = $conta + 5000;
         $users = null;
         $users = User::where('password', null)->where('id', '>=', $conta)->where('id', '<=', $termino)->get();
         foreach ($users as $us) {
             $qnt = Advert::where('user_id', $us->id)->count();
             if ($qnt <= 0) {
                 $us->delete();
             }
         }
         $conta = $termino;
     }
     echo $aaa;
 }