hello foo bar
OR検索+あいまい検索で検索ワードが定まっていないときなんかはクロジャーを使ういいっぽい。
use Illuminate\Support\Facades\DB;
...
$words = array("ライオン","ゲノム");
$records = DB::table('sometable')->orWhere(function($query) use($words){
foreach ($words as $k=>$word) {
$query->orWhere('text', 'like', '%'.$word.'%');
}
})
->orderBy('id','desc')
->get();