예제 #1
0
 /**
  * Find Users by their Social Details
  *
  * @param  string $email
  *
  * @return Collection
  */
 public function findUserByProviderAndId($provider, $id)
 {
     $socialite = Socialite::where('provider', '=', $provider)->where('auth_id', '=', $id)->first();
     if ($socialite) {
         return User::find($socialite->user_id);
     }
     return null;
 }
예제 #2
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array $data
  *
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['username' => $data['username'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'firstname' => $data['firstname'], 'lastname' => $data['lastname']]);
 }
예제 #3
0
 /**
  * Find Users by their Emails
  * @param  string $email
  * @return Collection
  */
 public function findUserByEmail($email)
 {
     return User::where('email', '=', $email)->first();
 }