@tisuchi Thank you for enlightening response but i get an error because i have policies that i run though that code. the following is the error...
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'permissions.role_id' in 'where clause' (Connection: mysql, SQL: select count(*) as aggregate from roles where id = 4 and exists (select * from permissions where roles.id = permissions.role_id and slug = Schools))