PersonalAccessToken class final
A row of personal_access_tokens (Sanctum-compatible schema).
Constructors
-
PersonalAccessToken({required Object id, required String tokenableType, required Object tokenableId, required String name, required String tokenHash, required List<
String> abilities, DateTime? lastUsedAt, DateTime? expiresAt, DateTime? createdAt}) -
const
-
PersonalAccessToken.fromRow(Map<
String, Object?> row) -
factory
Properties
-
abilities
→ List<
String> -
final
- createdAt → DateTime?
-
final
- expiresAt → DateTime?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → Object
-
final
- lastUsedAt → DateTime?
-
final
- name → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tokenableId → Object
-
final
- tokenableType → String
-
final
- tokenHash → String
-
SHA-256 (hex) of the secret part of the plain-text token.
final
Methods
-
can(
String ability) → bool -
Whether the token grants
ability(*grants everything). -
cant(
String ability) → bool -
isExpired(
[DateTime? now]) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited