Laravel: Paginating a query on a view MySQL Error 1140 Mixing of GROUP columns
问题 I am trying to do a simple pagination of a query that uses a view: DB::table('vw_myview')->paginate(50) And get this error: SQLSTATE[42000]: Syntax error or access violation: 1140 Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause (SQL: select count(*) as aggregate from vw_myview) Yet when I manually run the query, it works just fine: mysql> select count(*) as aggregate from vw_myview; +-----------+ | aggregate | +-----------+ |