Skip to content

[v6] Reuse code on withoutRole and withoutPermission #2500

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

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

erikn69
Copy link
Contributor

@erikn69 erikn69 commented Sep 13, 2023

on #2463, withoutRole and withoutPermission were added, but I think that duplicating the same code should be avoided.
Also I didn't understand what $debug = false is for

public function scopeWithoutPermission(Builder $query, $permissions, $debug = false): Builder

Laravel do the same

@drbyte
Copy link
Collaborator

drbyte commented Sep 13, 2023

Great! Thanks.

@drbyte drbyte merged commit 5659d6a into spatie:main Sep 13, 2023
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