Step 9 - Create Custom password Views for the user type

Create copies of these, one for each user type you have in your multi-auth set-up e.g:

email.blade.php

reset.blade.php

customer-email.blade.php

customer-reset.blade.php

Edit the post action for customer-email.blade.php and change it to customer.password.email (referring to the named routes we just created in step 8). This ensures the request gets posted to the correct controller!

Edit the template to make it obvious this is the customer reset password form. Change the heading for example.

Step 10 - Override showLinkRequestForm

In your new CustomerForgotPasswordController, override the showLinkRequestForm method to direct users to the correct reset password form.

Step 11 - Create Email Notification for user type

Navigate to /var/www/vendor/laravel/framework/src/Illuminate/Auth/Passwords
Open the file CanResetPassword.php the and locate the method sendPasswordResetNotification. Copy this method into you Customer model (in this example, your users will be different!)

If you're wondering were the $token value comes from, it gets passed to the notification be the call to sendPasswordResetNotification() in the Customer model (app/Customer.php) we just added.

Secondly, in the same file (CustomerResetPasswordNotification), customise the url action and email message that gets sent to the user:

/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
return (new MailMessage)
->line('You are receiving this email because we received a password reset request for your account.')
->action('Reset Password', route('customer.password.reset', $thi->token))
->line('If you did not request a password reset, no further action is required.');
}

Note the use of the route() function, which is given the route name (customer.password.reset) which we created earlier, and it's passed the $token to be able to form a password reset link.

Step 11 - Add the Notification class to your user model

Edit your model vim app/Customer.php
and include the CustomerResetPasswordNotification you just created: