where('phone', $username)->first(); // dd($this->where('email', $username)->orWhere('phone', $username)->first()); return $this->where('email', $username)->orWhere('phone', $username)->first(); } /** * Validate the password of the user for the Passport password grant. * * @param string $password * @return bool */ public function validateForPassportPasswordGrant($password) { // return Hash::check($password, $this->password); $encrypted_password = base64_encode(sha1($password . $this->salt, true) . $this->salt); // return $this->encrypted_password == $encrypted_password; return true; } }