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

[FEAT] add modifyQuery parameter to setNewOrder method #167

Merged
merged 9 commits into from Dec 11, 2023

Conversation

AbdelrahmanBl
Copy link
Contributor

No description provided.

@freekmurze
Copy link
Member

Could you add tests for this and update the readme with an example?

@AbdelrahmanBl
Copy link
Contributor Author

AbdelrahmanBl commented Dec 7, 2023

Hello sir, i had been added a test case and updated the readme file with an example.

@freekmurze
Copy link
Member

Although the implementation is now technically correct, I think we could create a more dynamic solution for this.

Instead of adding a parameter to pass an array of global scopes, let's pass a closure (parameter name could be $modifyQuery). In our code, we would pass the query to that closure, so the user can modify the query in any way (and not just only removing global scopes).

Could you perform these modifications?

@AbdelrahmanBl
Copy link
Contributor Author

Good evening sir, can you check these updates.

@freekmurze
Copy link
Member

Seems like the tests are failing, could you check?

@AbdelrahmanBl
Copy link
Contributor Author

Yes, it's my mistake can you check for now.

@freekmurze freekmurze merged commit e55bece into spatie:main Dec 11, 2023
9 checks passed
@freekmurze
Copy link
Member

Thanks!

@AbdelrahmanBl AbdelrahmanBl changed the title [FEAT] add withoutGlobalScopes to setNewOrder method [FEAT] add modifyQuery parameter to setNewOrder method May 13, 2024
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.

None yet

2 participants