Password Reset Token in Laravel

My current task is to implement an email to send to users when their account is created manually. We’re using the default Laravel auth set-up, but this is outside of that scope. I mostly wanted to copy the password reset email. I could figure out everything but how to get the password reset token. I both needed to create it and needed to send it to the email that we’re sending to the created users. This link got me close, but they appear to be using an older version of Laravel. (We’re on 5.2.) I did a bit of digging through the folder and found that a couple of things had been renamed. The code to use:

$token = app(‘’)->createToken($user);

Simple, but it definitely took some digging.

Leave a Reply

Your email address will not be published. Required fields are marked *