0
我用這個:https://github.com/rinvex/repository如何解決缺少Rinvex Repository Repositories BaseRepository :: join()的參數3?
我的查詢是這樣的:
$query = $this->store_repository
->join('favorites', function ($join) {
$join->on('stores.id', '=', 'favorites.favoritable_id')
->where('favorites.favoritable_type', 'like', 'App\\\Models\\\Store');
})
->where('stores.status', '=', 1)
->select('stores.id', 'stores.name', 'stores.photo','stores.address');
if($location)
$query->where('stores.address', 'like', "%$location%");
if($q) {
$query->where('stores.name', 'like', "%$q%")
->where('stores.address', 'like', "%$q%", 'or');
}
$result = $query->orderBy('favorites.updated_at', 'desc')->paginate($num);
執行時,存在誤差是這樣的:
缺少論據3 Rinvex \庫\庫\ BaseRepository :: join()
我該如何解決它?
添加缺少的參數。 – JustOnUnderMillions
@JustOnUnderMillions,哪裏缺少參數? –
我找不到任何有關'join()'方法的git repo文檔。這個文件在哪裏? – Joe