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

Chaperone tokenable model #539

Closed
wants to merge 1 commit into from
Closed

Conversation

scrummitch
Copy link

Since this repository requires laravel v11 lets automatically chaperone the tokenable relationship since its somewhat convoluted to eager load.

For example:

// Will cause a lazy loading exception if Model::preventLazyLoading() is enabled
$user->tokens->map(fn (PersonalAccessToken $token) {
    dump($token->tokenable);
});

Since this repository requires laravel v11 lets automatically chaperone the tokenable relationship since its somewhat convoluted to eager load
@taylorotwell
Copy link
Member

I don't think I really want to introduce this on a patch release.

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