|
@@ -117,7 +117,7 @@ class User extends BaseModel
|
|
|
|
|
|
public function latestLogInPin(){
|
|
|
if($this->email) {
|
|
|
- $loginOrSignupAttempt = LoginOrSignupAttempt::whereRaw('email', 'ilike', $this->email)
|
|
|
+ $loginOrSignupAttempt = LoginOrSignupAttempt::where('email', 'ilike', $this->email)
|
|
|
->where('is_valid', true)->orderBy('created_at', 'desc')->first();
|
|
|
if ($loginOrSignupAttempt) {
|
|
|
return $loginOrSignupAttempt->pin;
|