I have got something similar but I'm using ID as value of the select. Then I'm performing a query like so:
$query->whereHas('roles', function($query) use ($roleId) {
$query->where('role_id', '=', $roleId);
});
The difference is that I'm not digging my way down to the roles table, but staying on the role_user table. I could imagine that this is the issue with your query. You are trying to find the role by name but as you are still in the pivot there is no name.