whereEmail($usernameOrEmail) : $this->whereUsername($usernameOrEmail); } public function whereEmail($email) { return $this->andWhere(['email' => $email]); } public function whereUsername($username) { return $this->andWhere(['username' => $username]); } public function whereId($id) { return $this->andWhere(['id' => $id]); } }