Get all users which dont have admin role in belongsToMany relation
I want to get all user which don't have admin role, it's a belongsToMany relation where a user can have many roles. I want to get only the user who is not an admin.
I have tried following but it gives me users nested in each role, I want it a list of users limit(5) as a collection.
I dont know anything about your user's table structure. I assume that, there is a table column name admintype where you store user role id / type name.