-
Notifications
You must be signed in to change notification settings - Fork 42
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
How to ignore entries present in the filter URL? #25
Comments
Thank you for your kind words.
Each parameter that has a value applies as a filter. For more info see ignore filters on null value in readme file. |
@mohammad-fouladgar I got to see this section in the documentation. For the case of the parameter The problem is exactly in the |
@ronaldaraujo Normally, when a filter is displayed, submitted and has a value, it applies. It's possible I see your 'Controller' and OriginResourceFilter? What do you think we have a method to ignore some of the filters? Like the following:
$users = EloquentBuilder::to(User::class,$filters)->ignoreFilter('some_filter(s)')->get() |
@mohammad-fouladgar maybe I have to fix my logic, but in my current scenario there are two inputs that are not part of any filter in the database. As I mentioned earlier, they would only be used to display a particular piece of content within the PDF. This is the view:
Note that there are two buttons:
See my controller:
In summary, it would be amazing if we had some of the methods you mentioned:
|
Have you tried this |
@joefazee I had already thought of something similar:
However, I believe that there will be many fields in the front, so I was looking for something inside the library to leave the code clean. But, thanks for the suggestion. |
@joefazee You pointed to a nice note. @ronaldaraujo You must send the filters separately. Look at the example below: /process?filters[identification]=999&filters[year]=2019&filters[city_id]=1&filters[institution_id]=4&movement_status=on&origin_resource=Com+emenda Then usage like this below: $processes = EloquentBuilder::to(
Process::class,
$request->filters
)->paginate(); Please feel free to any question 😉 |
Implemented successfully. Thanks to all for your help :) |
Hello! The tool you developed is incredible. Congrats on the job!
Now how can I ignore some variables in the entry of my URL?
For example, the number 1 in the image below shows the filters that are needed. The parameters of item 2 are only required to display some items in the PDF. That is, these parameters are used as flags (true or false).
Is it possible to do that?
My URL:
The text was updated successfully, but these errors were encountered: