sortable not working with "where"
gesitaric opened this issue · 0 comments
gesitaric commented
Im getting this error when trying to sort some of my columns
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sort' in 'where clause' (SQL: select count(*) as aggregate from
books
where (is_visible
= 1 andsort
= date anddirection
= asc))
Here is my controller:
public function index()
{
return response()->view('books.index', ['books' => Book::where('is_visible', 1)->sortable()->paginate(5)]);
}
Any ideas??