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 | $dateAttributes | from AbstractModel |
|
|
static | $defaults | 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
Get an attribute from the model. If nothing is found, attempt to load a custom relation method with this key.
Register a callback to be run once after the model is saved.
Register a callback to be run once after the model is deleted.
Details
in AbstractModel
at
line 56
static
boot()
{@inheritdoc}
in AbstractModel
at
line 76
__construct(array $attributes = [])
{@inheritdoc}
in AbstractModel
at
line 96
array
getDates()
Get the attributes that should be converted to dates.
in AbstractModel
at
line 114
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 140
protected mixed
getCustomRelation(string $name)
Get a custom relation object.
in AbstractModel
at
line 156
void
afterSave(callable $callback)
Register a callback to be run once after the model is saved.
in AbstractModel
at
line 167
void
afterDelete(callable $callback)
Register a callback to be run once after the model is deleted.
in AbstractModel
at
line 175
callable[]
releaseAfterSaveCallbacks()
in AbstractModel
at
line 187
callable[]
releaseAfterDeleteCallbacks()
in AbstractModel
at
line 199
__call($method, $arguments)
{@inheritdoc}
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.