Skip to content

[13.x] Add can and cant methods to Token model#1882

Merged
taylorotwell merged 3 commits intolaravel:13.xfrom
hafezdivandari:13.x-can-cant-on-token-model
Feb 9, 2026
Merged

[13.x] Add can and cant methods to Token model#1882
taylorotwell merged 3 commits intolaravel:13.xfrom
hafezdivandari:13.x-can-cant-on-token-model

Conversation

@hafezdivandari
Copy link
Contributor

Fixes #1881

Following the 13.x refactor where scope authorization logic was extracted into the new AccessToken class (#1755), the can and cant methods were removed from the Token model surface.

This PR restores the can and cant methods on Laravel\Passport\Token to help performing scope checks directly on the token model and to preserve backwards compatibility

@taylorotwell taylorotwell merged commit 9931653 into laravel:13.x Feb 9, 2026
9 checks passed
@hafezdivandari hafezdivandari deleted the 13.x-can-cant-on-token-model branch February 9, 2026 14:11
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.

There is no an ability to check scopes for user tokens

2 participants