Skip to content
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

Integration with Eloquent Eager Limit #173

Open
lannodev opened this issue Apr 2, 2024 · 1 comment
Open

Integration with Eloquent Eager Limit #173

lannodev opened this issue Apr 2, 2024 · 1 comment

Comments

@lannodev
Copy link

lannodev commented Apr 2, 2024

Before Laravel 11 to use compoships with Eloquent Eager Limit it was necessary to use this Compoships Eager Limit package.
Now the Eloquent Eager Limit package is native on Laravel.
Please, its possible to make compoships to works with it ?

Using just compoships in laravel 11 I get the following error: stripos(): Argument #1 ($haystack) must be of type string, array given

example:

User::with([
    'posts' => fn ($query) => $query->limit(3)
])->paginate();

All the best

@parallels999
Copy link

Feel free to open a PR with the upgrade, don't forget to add some tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants