2

I'd like the Password::remind method to respond with the token and not send email to the email address provided. Can I suppress/disable email?

help would be much appreciated.

4

1 回答 1

3

我不认为你可以,你能做的最好的就是自己制作一个,使用 Laravel 的方式:

创建一个新类:

<?php

use Illuminate\Auth\Reminders\DatabaseReminderRepository as DbRepository;

class Reminder {

    public static function create($user)
    {
        $reminders = new DbRepository(DB::connection(), Config::get('auth.reminder.table'), Config::get('app.key'));

        return $reminders->create( $user );
    }

}

并使用它

$user = User::find(2);

echo Reminder::create($user);

之后,您可以检查您的 password_reminders 表,您的新令牌将在那里:

select * from password_reminders;
于 2013-06-03T16:45:53.927 回答