With the version 5.8.1 there is an issue with multiple partial filters, the query builder throw an error: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined `select count(*) as aggregate from "users" where LOWER("users"."name") LIKE %vella% ESCAPE '\' and LOWER("users"."email") LIKE %rea% ESCAPE '\'` The query seems ok, I've tested with Laravel 11.7.0 and Postgres 16 and also on Postgres 14 .