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

[5.7] Support custom accessor on whenPivotLoaded() #25661

Merged
merged 1 commit into from
Sep 17, 2018
Merged

[5.7] Support custom accessor on whenPivotLoaded() #25661

merged 1 commit into from
Sep 17, 2018

Conversation

staudenmeir
Copy link
Contributor

This is an improved re-submit of #25625.

There is now a separate whenPivotLoadedAs() method to avoid breaking changes:

return [
    'expires_at' => $this->whenPivotLoadedAs('accessor', 'role_user', function () {
        return $this->accessor->expires_at;
    }),
];

Fixes #25596.

@taylorotwell taylorotwell merged commit 2e24dee into laravel:5.7 Sep 17, 2018
@staudenmeir staudenmeir deleted the when-pivot-loaded branch September 18, 2018 01: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