I am getting error on pagination
$writers = $writer::join('categories','categories.id','=','writers.category_id')
->where([['categories.category_name', '=', $category]])->paginate(1);
Can anyone tell how to paginate an inner join query.
This is the error message I'm getting:
QueryException in Connection.php line 770: 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 writers` inner join categories on categories.id = writers.category_id where (categories.category_name = Comic))