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

$and condition and paginate() #21

Open
romatexdev opened this issue Oct 27, 2023 · 2 comments
Open

$and condition and paginate() #21

romatexdev opened this issue Oct 27, 2023 · 2 comments

Comments

@romatexdev
Copy link

romatexdev commented Oct 27, 2023

Hi! Thank you for this wonderful package! It made it easier to create filters!!!
But there are points that are not specified in the documentation.

  1. How do I use a filter inside my livewire component with the condition $and? I have an array of identifiers by which to filter with the condition that they are all present in the output. With the use of $eq, $contains, everything is clear, but here I can't figure out how to use it.
    I'll clarify. I don't use the query string, everything happens inside the livewire component.

  2. How to apply pagination after filtering and sorting? If I now apply ->paginate(), then it causes an error.

@romatexdev romatexdev changed the title $end condition and paginate() $and condition and paginate() Oct 28, 2023
@abbasudo
Copy link
Owner

abbasudo commented Nov 3, 2023

hello @romatexdev
please provide me with more details and the error message that you are getting.

@CarlosEduardoTalaveraRivera

Hi @romatexdev

I don't know how you're doing it, but I used paginate() with no problems just like this: Model::filter()->paginate()

I don't use sorting on my project, but it works too

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

3 participants