当我在laravel tinker中尝试此查询时,我使用laravel scout成功获得结果
App\Business::search('Test')->get();
但是当我尝试使用分页器
App\Business::search('Test')->paginate(15);
我得到了错误
BadMethodCallException with message 'Call to undefined method Illuminate/Database/Query/Builder::leftJoinSub()'
这是我的模特
<?php
namespace App;
use Laravel\Scout\Searchable;
use Illuminate\Database\Eloquent\Model;
class Business extends Model
{
use Searchable;
protected $table = 'business';
public function searchableAs()
{
return 'business_index';
}
}