class RegistrationToken extends AbstractModel
Properties
| bool | $timestamps | Indicates if the model should be timestamped. Turn off by default. | from AbstractModel |
|
| protected callable[] | $afterSaveCallbacks | An array of callbacks to be run once after the model is saved. | from AbstractModel |
|
| protected callable[] | $afterDeleteCallbacks | An array of callbacks to be run once after the model is deleted. | from AbstractModel |
|
| static array | $customCasts | from AbstractModel |
|
|
| static array | $defaults | from AbstractModel |
|
|
| static protected array<class-string,array<string,string>> | $castsCache | Resolved casts, keyed by model class. | from AbstractModel |
|
| protected string|null | $tableAlias | An alias for the table name, used in queries. | from AbstractModel |
|
| string[]|null | $uniqueKeys | If a model has unique keys, they should be defined here. | from AbstractModel |
|
| protected | $casts |
|
||
| bool | $incrementing | Use a custom primary key for this model. |
|
|
| protected | $primaryKey |
|
||
| protected | $keyType | The token is a random string, not a number. Without this Eloquent binds a lookup as an integer, and on MySQL/MariaDB a lookup for `0` matches any token beginning with a letter (GHSA-55f2-h36g-96c3). |
|
|
| string | $token |
|
||
| string | $provider |
|
||
| string | $identifier |
|
||
| array | $user_attributes |
|
||
| array | $payload |
|
||
| Carbon | $created_at |
|
Methods
static void
flushCastsCache()
Discard the resolved casts, so that newly registered ones are picked up.
from AbstractModel
void
afterSave(callable $callback)
Register a callback to be run once after the model is saved.
from AbstractModel
void
afterDelete(callable $callback)
Register a callback to be run once after the model is deleted.
from AbstractModel
static RegistrationToken
generate(string $provider, string $identifier, array $attributes, array $payload)
Generate an auth token for the specified user.
scopeValidOrFail(Builder $query, string $token)
Find the token with the given ID, and assert that it has not expired.
Details
in AbstractModel
at
line 83
static
boot()
in AbstractModel
at
line 100
__construct(array $attributes = [])
in AbstractModel
at
line 115
array
getCasts()
in AbstractModel
at
line 135
static void
flushCastsCache()
Discard the resolved casts, so that newly registered ones are picked up.
in AbstractModel
at
line 143
void
afterSave(callable $callback)
Register a callback to be run once after the model is saved.
in AbstractModel
at
line 151
void
afterDelete(callable $callback)
Register a callback to be run once after the model is deleted.
in AbstractModel
at
line 159
array
releaseAfterSaveCallbacks()
in AbstractModel
at
line 171
array
releaseAfterDeleteCallbacks()
in AbstractModel
at
line 183
newModelQuery()
in AbstractModel
at
line 195
qualifyColumn($column)
in AbstractModel
at
line 204
mixed
withTableAlias(callable $callback)
in AbstractModel
at
line 217
Collection
newCollection(array $models = [])
in AbstractModel
at
line 223
__sleep()
at
line 55
static RegistrationToken
generate(string $provider, string $identifier, array $attributes, array $payload)
Generate an auth token for the specified user.
at
line 74
RegistrationToken
scopeValidOrFail(Builder $query, string $token)
Find the token with the given ID, and assert that it has not expired.