Skip to content

[7.x] Call named scope and consistent method naming #32631

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 3 commits into from
May 1, 2020
Merged

Conversation

GrahamCampbell
Copy link
Member

@GrahamCampbell GrahamCampbell commented May 1, 2020

  1. The model is the source of truth for if a scope exists, but then the builder bypasses it to call the scope method. Instead, we should delegate to the model. This PR addresses this, and provides a reusable way to apply scopes.
  2. [7.x] Add hasScope function to the Base Model #32622 added hasScope, but the name hasNamedScope would be more consistent, since callScope expects a full on callable and callNamedScope expects the actual scope name.

@GrahamCampbell GrahamCampbell changed the title [7.x] Implement call named scope [7.x] Implement call named scope and consitent naming May 1, 2020
@GrahamCampbell GrahamCampbell changed the title [7.x] Implement call named scope and consitent naming [7.x] Call named scope and consistent method naming May 1, 2020
@GrahamCampbell GrahamCampbell marked this pull request as ready for review May 1, 2020 16:56
@taylorotwell taylorotwell merged commit dda3174 into 7.x May 1, 2020
@GrahamCampbell GrahamCampbell deleted the named-scopes branch May 1, 2020 18:33
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.

3 participants