Laravel filter a value in all columns
问题 public function getBooks($input) { $books= Book::where('book_name', 'LIKE', '%' . $input . '%')->get(); return Response::json($books); } I know how to filter a column by a given value. But how do I filter ALL columns by a given value. For example, I have a column called 'category' where user should be able to use the same search bar to filter the category. Something like: $books = Book::where('all_columns', 'LIKE', '%' . $input . '%')->get(); Thanks! 回答1: Most databases do not support