Exemplo n.º 1
0
 /**
  * Get ID of an existing user or create them first.
  *
  * @param array $profile
  * @return int
  */
 protected function obtainUserId(array $profile)
 {
     $user = $this->user->where('email', '=', $profile['email'])->first();
     return $user ? $user->getKey() : $this->createUser($profile)->getKey();
 }