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

Pagination Seems Broken #201

Open
aalicki opened this issue May 2, 2024 · 1 comment
Open

Pagination Seems Broken #201

aalicki opened this issue May 2, 2024 · 1 comment

Comments

@aalicki
Copy link

aalicki commented May 2, 2024

Laravel: 10.0
PHP Ver: 8.2
EloquentFilter Ver: Latest (3.3)

Problem:

I am attempting a basic filtering on a model, in doing so I'm applying ->simplePaginateFilter() or ->paginateFilter() and neither seem to work. I get an error Call to undefined method Illuminate\Database\Eloquent\Builder::simplePaginateFilter()

Code Examples:

$data = Item::filter($request->all())->simplePaginateFilter();

$data = Item::filter($request->all())->paginateFilter();

Error Returned:
Call to undefined method Illuminate\Database\Eloquent\Builder::simplePaginateFilter()


Potential Documentation Bug?

When I chain ->paginateSimple() to the query, it works without issue.

@Tucker-Eric
Copy link
Owner

Tucker-Eric commented May 3, 2024

Hmm, those methods are actually local scopes on the model. Have you done anything that would cause the scopes to not be caught by Eloquent?

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