【问题标题】:Laravel Change expired link token to reset password?Laravel 更改过期的链接令牌以重置密码?
【发布时间】:2021-03-30 04:27:39
【问题描述】:

当我们发送链接重置密码时,我想将过期链接设置为链接 7 天。我知道,我们可以在config/auth.php 中更改它。

但是,如何将过期链接更改为 7 天?请帮帮我!


/*
    |--------------------------------------------------------------------------
    | Resetting Passwords
    |--------------------------------------------------------------------------
    |
    | You may specify multiple password reset configurations if you have more
    | than one user table or model in the application and you want to have
    | separate password reset settings based on the specific user types.
    |
    | The expire time is the number of minutes that the reset token should be
    | considered valid. This security feature keeps tokens short-lived so
    | they have less time to be guessed. You may change this as needed.
    |
    */

    'passwords' => [
        'users' => [
            'provider' => 'users',
            'table' => 'password_resets',
            'expire' => 60,
        ],
    ],

【问题讨论】:

  • 10080替换60

标签: laravel reset-password


【解决方案1】:

'expire'=> 60 *24 *7

这里60 是分钟 24 是小时 而7 是天

【讨论】:

    猜你喜欢
    • 2019-01-12
    • 2019-09-16
    • 1970-01-01
    • 2020-05-15
    • 1970-01-01
    • 2020-03-30
    • 1970-01-01
    • 1970-01-01
    • 2016-01-26
    相关资源
    最近更新 更多