HasApiTokens
interface HasApiTokens
Methods
bool
tokenCan(UnitEnum|string $ability)
Determine if the current API token has a given ability.
bool
tokenCant(UnitEnum|string $ability)
Determine if the current API token is missing a given ability.
createToken(string $name, array $abilities = ['*'], DateTimeInterface|null $expiresAt = null)
Create a new personal access token for the user.
HasAbilities|null
currentAccessToken()
Get the access token currently associated with the user.
Details
at line 17
MorphMany
tokens()
Get the access tokens that belong to model.
at line 22
bool
tokenCan(UnitEnum|string $ability)
Determine if the current API token has a given ability.
at line 27
bool
tokenCant(UnitEnum|string $ability)
Determine if the current API token is missing a given ability.
at line 34
NewAccessToken
createToken(string $name, array $abilities = ['*'], DateTimeInterface|null $expiresAt = null)
Create a new personal access token for the user.
at line 39
HasAbilities|null
currentAccessToken()
Get the access token currently associated with the user.
at line 46
HasApiTokens
withAccessToken(HasAbilities|null $accessToken)
Set the current access token for the user.