SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users.name' in 'where clause' (Connection: mysql, SQL: select distinct `users`.* from `users` left join `model_has_roles` on `users`.`id` = `model_has_roles`.`model_id` where (`users`.`name` like %myName%) and not exists (select * from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `users`.`id` = `model_has_roles`.`model_id` and `model_has_roles`.`model_type` = App\Models\User and `roles`.`id` = 1) order by `users`.`name` asc limit 50)
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users.name' in 'where clause' (Connection: mysql, SQL: select distinct `users`.* from `users` left join `model_has_roles` on `users`.`id` = `model_has_roles`.`model_id` where (`users`.`name` like %myName%) and not exists (select * from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `users`.`id` = `model_has_roles`.`model_id` and `model_has_roles`.`model_type` = App\Models\User and `roles`.`id` = 1) order by `users`.`name` asc limit 50)