compoships icon indicating copy to clipboard operation
compoships copied to clipboard

Integration with Eloquent Eager Limit

Open lannodev opened this issue 10 months ago • 1 comments

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

lannodev avatar Apr 02 '24 15:04 lannodev

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

parallels999 avatar Jul 12 '24 17:07 parallels999