compact(): 未定义的变量: 运算符
我收到以下错误
(1/1) ErrorException
compact(): Undefined variable: operator
这是我的代码行
$postsCat = Post::whereHas('Cat', function($query) use ($sreachWord) {
return $query->whereRaw('name REGEXP"'.sql_text_to_regx($sreachWord).'"');
})->orderBy('top','desc')
->orderBy('updated_at','desc')
->paginate(30);
为什么会发生这种情况?是因为我的PHP版本(7.3)还是其他原因?