-
Notifications
You must be signed in to change notification settings - Fork 241
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
BaseEloquentRepository allWithBuilder() Error #487
Comments
Hm interesting, this worked before. Indeed I think the |
This was referenced Mar 9, 2018
@nWidart I think if we use Translatable Model, we can avoid this error.
|
nWidart
pushed a commit
that referenced
this issue
Jun 29, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary of issue
Type error: Return value of Modules\Core\Repositories\Eloquent\EloquentBaseRepository::allWithBuilder() must be an instance of Illuminate\Database\Eloquent\Builder, instance of Modules\{ModuleName}\Entities\{ModelName} returned
{ModuleName}
and{ModelName}
is just sample name.I got an error while calling
allWithBuilder()
of my own repository. (Which extends BaseRepository without any overriding)I looked into the error and I found that this method returns
return $this->model;
Just like the link below
Platform/Modules/Core/Repositories/Eloquent/EloquentBaseRepository.php
Line 62 in 9f9c4c4
Maybe we should change this method into
return $this->model->query();
to avoid errorSteps to reproduce
System Details
Asgardcms/Platform
versionThe text was updated successfully, but these errors were encountered: