-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[6.1.3] Method Illuminate\Support\Collection::load does not exist. #339
Comments
You're getting back a plain collection instead of an Are you overwriting the |
Nope, not overwriting If it matters, I'm using the |
Oh, I'd like to add that I can get around the problem by doing the following instead: MyModel::search('myQuery')->paginate(0)->load('myRelation'); |
I think it might be related to this piece of code: https://github.com/teamtnt/laravel-scout-tntsearch-driver/blob/master/src/Engines/TNTSearchEngine.php#L197-L206 But it's best that you open up an issue on their repo. |
I have the same problem. I am using it with Laravel 5.7 and latest drivers. $posts = Post::search($query)->where('approved', 1)->paginate(0);
$posts->load(['author', 'category']); Any update on it? |
@driesvints is this a TNT issue? The problem that I can see is that when using I've been forced to use the |
@mforcer I believe so. Look at the line I linked to. It always returns a plain collection and not an Eloquent one. |
|
When I updated to 6.1.3 from 6.1.1, I can no longer do the following:
And I receive the error
Is there a new suggested method for loading relationships with searching?
The text was updated successfully, but these errors were encountered: