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

Hotfix Resolve #89

Merged
merged 6 commits into from
Oct 13, 2024
Merged

Hotfix Resolve #89

merged 6 commits into from
Oct 13, 2024

Conversation

abbasudo
Copy link
Owner

@abbasudo abbasudo commented Oct 13, 2024

This pull request includes several changes to improve the filtering capabilities and add new relationships in the models. The most important changes include refactoring the Resolve class methods, updating the Filterable trait, enhancing the Post, Book, and Product models, and adding new tests for relation filtering.

Refactoring and Enhancements:

  • src/Filters/Resolve.php: Refactored the validate and safe methods to improve readability and reliability. Added new methods prepareModelForRelation and restorePreviousModel to handle model relations more cleanly. [1] [2] [3]
  • src/Traits/Filterable.php: Updated the scopeFilter and bootFilter methods to use the Resolve class directly, improving dependency management and code clarity. [1] [2]

Model Updates:

Testing Enhancements:

  • tests/Feature/RelationFilterTest.php: Added new test cases for filtering by various relationships, including has-many, belongs-to, belongs-to-many, and has-one relations.
  • tests/TestCase.php: Configured the purity.silent setting to false for better error visibility during testing.

@abbasudo abbasudo merged commit 5ad2361 into master Oct 13, 2024
26 checks passed
@abbasudo abbasudo deleted the hotfix/resolve branch October 13, 2024 14:49
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

Successfully merging this pull request may close these issues.

2 participants