*/ public function latest(int $count = 20): Collection; /** * Set specified role to specified user. */ public function setRole(int $userId, int $roleId): bool; /** * Change role for all users that have role $fromRoleId to $toRoleId. */ public function switchRolesForUsers(int $fromRoleId, int $toRoleId): bool; /** * Get all users with provided role. * * @return Collection */ public function getUsersWithRole(string $roleName): Collection; /** * Get all social login records for specified user. */ public function getUserSocialLogins(int $userId): \Illuminate\Support\Collection; /** * Find user by confirmation token. */ public function findByConfirmationToken(string $token): ?User; /** * Find user by phone and country code. */ public function findForTwoFactor(string $phone, string $countryCode): ?User; }