class PasswordToken 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 | $customRelations | from AbstractModel |
|
|
| static | $customCasts | from AbstractModel |
|
|
| static | $defaults | from AbstractModel |
|
|
| protected string|null | $tableAlias | An alias for the table name, used in queries. | from AbstractModel |
|
| int|null | $id | from AbstractModel |
|
|
| protected array | $dates | The attributes that should be mutated to dates. |
|
|
| bool | $incrementing | Use a custom primary key for this model. |
|
|
| protected | $primaryKey | {@inheritdoc} |
|
|
| string | $token |
|
||
| Carbon | $created_at |
|
||
| int | $user_id |
|
Methods
mixed
getAttribute(string $key)
Get an attribute from the model. If nothing is found, attempt to load a custom relation method with this key.
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
Details
in AbstractModel
at
line 77
static
boot()
{@inheritdoc}
in AbstractModel
at
line 97
__construct(array $attributes = [])
{@inheritdoc}
in AbstractModel
at
line 115
getCasts()
{@inheritdoc}
in AbstractModel
at
line 133
mixed
getAttribute(string $key)
Get an attribute from the model. If nothing is found, attempt to load a custom relation method with this key.
in AbstractModel
at
line 159
protected mixed
getCustomRelation(string $name)
Get a custom relation object.
in AbstractModel
at
line 175
void
afterSave(callable $callback)
Register a callback to be run once after the model is saved.
in AbstractModel
at
line 186
void
afterDelete(callable $callback)
Register a callback to be run once after the model is deleted.
in AbstractModel
at
line 194
callable[]
releaseAfterSaveCallbacks()
in AbstractModel
at
line 206
callable[]
releaseAfterDeleteCallbacks()
in AbstractModel
at
line 218
__call($method, $arguments)
{@inheritdoc}
in AbstractModel
at
line 227
newModelQuery()
in AbstractModel
at
line 238
qualifyColumn($column)
in AbstractModel
at
line 247
withTableAlias(callable $callback)
in AbstractModel
at
line 262
newCollection(Collection|array $models = [])
at
line 48
static PasswordToken
generate(int $userId)
Generate a password token for the specified user.
at
line 64
BelongsTo
user()
Define the relationship with the owner of this password token.