Laravel - Password Reset - Reset Link Customization
You may customize the password reset link URL using the createUrlUsing
method provided by the ResetPassword
notification class. This method accepts a closure which receives the user instance that is receiving the notification as well as the password reset link token. Typically, you should call this method from your App\Providers\AuthServiceProvider
service provider's boot
method:
use Illuminate\Auth\Notifications\ResetPassword;
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
ResetPassword::createUrlUsing(function ($user, string $token) {
return 'https://example.com/reset-password?token='.$token;
});
}