-
Notifications
You must be signed in to change notification settings - Fork 122
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
BelongsToMany and paginateFilter() destroys pivot #43
Comments
Can you provide a code example? |
Closing due to We can reopen if there is an example that will replicate this behavior. |
@Cannonb4ll you can use the second parameter to specify what you want: |
@Tucker-Eric Create the following relation: user -> company_user <- companies The table company_user is a pivot table, if I do the following methods, see the difference:
You can see, the relations are now empty when using |
@Cannonb4ll I was able to reproduce this and it should be fixed in 5583402 Are you able to pull the latest ( |
@Tucker-Eric Confirmed and is resolved with |
Awesome! Updated in https://github.com/Tucker-Eric/EloquentFilter/releases/tag/1.3.2 |
When using the method
paginateFilter()
on a model with pivot table, this pivot table is not present inside the model. When changing back topaginate()
the pivot model is back.companies - company_user - users
In this case, if I would get all the users inside a company, and there would be any additional data inside the pivot table, it would be added inside the 'relations' object inside the model, but this is not present.
The text was updated successfully, but these errors were encountered: