1// Add this function to User model
2
3 /**
4 * @param $identifier
5 * @return Model|Builder|null
6 */
7 public function findForPassport($identifier): Model|Builder|null
8 {
9 return $this->newQuery()->where('username', $identifier)->first();
10 }