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

[8.x] Add hasVerifiedEmail scope #35217

Closed
wants to merge 2 commits into from
Closed

[8.x] Add hasVerifiedEmail scope #35217

wants to merge 2 commits into from

Conversation

iamgergo
Copy link
Contributor

@iamgergo iamgergo commented Nov 13, 2020

Just like in #35215, this scope provides a more convinient way of scoping users with a verified email.

I know we have more flexibility here than in the case of DatabaseNotification – so anyone can easily implement a custom scope – but in my experience, often this is one of the first things to do in a project so I thought it might be a good idea adding a scope by default.

* @param \Illuminate\Database\Eloquent\Builder $query
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeHasVerifiedEmail(Builder $query);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change for any class that implements this interface.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't think this needs to be added to the interface since this is leaking Eloquent into the auth component.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I was hesitating about that. I remove that from the interface.

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

3 participants