我正在使用以下代码在 laravel 中的数组错误上调用成员函数 paginate()
public static function search_query($query)
{
$tokenizeitem = array();
$tokenizeitem = queryarr($query);
//$tokenizeitem = $this->bbbootstrap->tokenizeStringIntoFTSWords($item);
$sql = "SELECT * FROM snippets WHERE MATCH(snippets_name,seo_description)
AGAINST (' ";
foreach ($tokenizeitem as $w) {
$sql .= '+' . $w . '* ';
}
$sql .= "' IN BOOLEAN MODE)";
$searchdata=DB::select( DB::raw($sql))->paginate(15);
return $searchdata;
}