PHP Class Flarum\Core\EmailToken

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 ( string $email, integer $userId ) : static Generate an email token for the specified user.
scopeValidOrFail ( Builder $query, string $id ) : static Find the token with the given ID, and assert that it has not expired.
user ( ) : BelongsTo Define the relationship with the owner of this email token.

Method Details

generate() public static method

Generate an email token for the specified user.
public static generate ( string $email, integer $userId ) : static
$email string
$userId integer
return static

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

user() public method

Define the relationship with the owner of this email token.
public user ( ) : BelongsTo
return Illuminate\Database\Eloquent\Relations\BelongsTo

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