Level 1
$key = ' test word';
$q = DB::selectRaw(' SELECT * , MATCH(col 1,col 2) AGAINST ("'.$key.'" IN BOOLEAN MODE) AS score FROM test
WHERE MATCH(col 1,col 2) AGAINST ("'.$key.'" IN BOOLEAN MODE)')->paginate(100);
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
is there a way to use Laravel pagination in this situation :
Query for full mysql search :
$key = ' test word';
$q = DB::select(' SELECT * , MATCH(col 1,col 2) AGAINST ("'.$key.'" IN BOOLEAN MODE) AS score FROM test WHERE MATCH(col 1,col 2) AGAINST ("'.$key.'" IN BOOLEAN MODE)');
Query is ok, I get good results, but cant use clasic ->pagination() gett error, that can use pagination on array.
Thanks, Pavle
Please or to participate in this conversation.