Reputation: 33
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.
Upvotes: 2
Views: 1091
Reputation: 87789
I don't think you can, the best you can do is to make one yourself, using Laravel's way of doing it:
Create a new class:
<?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 );
}
}
And use it
$user = User::find(2);
echo Reminder::create($user);
After that you can check your password_reminders table, you new token will be there:
select * from password_reminders;
Upvotes: 3