PHP Class Flarum\Core\AuthToken

Inheritance: extends Flarum\Database\AbstractModel
Mostra file Open project: flarum/core Class Usage Examples

Public Properties

Property Type Description
$incrementing boolean Use a custom primary key for this model.

Protected Properties

Property Type Description
$dates
$table

Public Methods

Method Description
generate ( $payload ) : static Generate an email token for the specified user.
getPayloadAttribute ( string $value ) : string Unserialize the payload attribute from the database's JSON value.
scopeValidOrFail ( Builder $query, string $id ) : static Find the token with the given ID, and assert that it has not expired.
setPayloadAttribute ( string $value ) Serialize the payload attribute to be stored in the database as JSON.

Method Details

generate() public static method

Generate an email token for the specified user.
public static generate ( $payload ) : static
return static

getPayloadAttribute() public method

Unserialize the payload attribute from the database's JSON value.
public getPayloadAttribute ( string $value ) : string
$value string
return string

scopeValidOrFail() public method

Find the token with the given ID, and assert that it has not expired.
public scopeValidOrFail ( Builder $query, string $id ) : static
$query Illuminate\Database\Eloquent\Builder
$id string
return static

setPayloadAttribute() public method

Serialize the payload attribute to be stored in the database as JSON.
public setPayloadAttribute ( string $value )
$value string

Property Details

$dates protected_oe property

protected $dates

$incrementing public_oe property

Use a custom primary key for this model.
public bool $incrementing
return boolean

$table protected_oe property

protected $table