I actually managed to achieve the same requirement in a different approach. My initial requirement was to show a the users who have the role "Parent" in a different index view. In addition to that, I wanted to show all other users except "Parents" in another view. In both cases, I wanted to hide the administrator account, which is why "whereNotIn()" method was used.
So now I actually filter the users based on their roles in the view itself. For that I used the following two code segments inside the foreach loop in "parents.index" view and "users.index" view respectively.