Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

112
Vistas
Reset Password Email

I am new to laravel development and currently working on small project. I would like to customize the email template for the reset passwords or even link it to completely different template. For the authentication scaffolding I have used the php artisan make:auth command.

However the default reset password functionality uses default laravel email template. Is it possible that I can create different email template and link it to reset password Controller? Also I would like to pass in additional user information in.

I am using laravel 5.4 version.

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You can generate a Notification class with:

php artisan make:notification ResetPassword

You can override toMail() method there to customize subject and line.

   public function toMail($notifiable)
    {
        return (new MailMessage)
            ->subject('Reset Password Request')
            ->line('You are receiving this email because we received a password reset request for your account.')
            ->action('Reset Password', url('password/reset', $this->token))
            ->line('If you did not request a password reset, no further action is required.');
    }

And in users model:

   use Illuminate\Notifications\Notifiable;
   use App\Notifications\ResetPassword as ResetPasswordNotification;

    public function sendPasswordResetNotification($token)
        {
            $this->notify(new ResetPasswordNotification($token));
        }

And to customize whole email template. here is the view: resources/views/notification/email.blade.php;

And in config/app.php, You can change the application name, default is laravel.

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda