使用默认的方法是没问题的(如下):
public function toSearchableArray()
{
#_ Read Data
$Arr_Posts = $this -> toArray();
#_ Back to Scout
return $Arr_Posts;
}
但是我想加条件的话
public function toSearchableArray()
{
#_ Read Data
$Arr_Posts = $this -> select(['title','content']) -> get() ->toArray();
#_ Back to Scout
return $Arr_Posts;
}
就会出现如下提示:
Record at the position 6 objectID=10 is too big size=24300 bytes. Contact us if you need an extended quota