Laravel 5.6 中的搜索查询

Mȍh*_*mȋm 0 php laravel laravel-5.6

我正在使用 Laravel 5.6,

如何在 laravel查询构建器或Eloquent 中转换以下查询?

SELECT * FROM books 
WHERE book_title LIKE '%something%' 
OR book_author LIKE '%something%'
OR *book_description LIKE '%something%' 
Run Code Online (Sandbox Code Playgroud)

我在谷歌搜索了很多,但我找不到任何解决我问题的方法。

aru*_*run 5

雄辩版:

Books::where('book_title ','LIKE','%'.$something.'%')
       ->orWhere('book_author ','LIKE','%'.$something.'%')
       ->orWhere('book_description ','LIKE','%'.$something.'%')->get();
Run Code Online (Sandbox Code Playgroud)