Parola sıfırlama e-postanızı değiştirebilir, ancak birazdan çalışmaya gerek duyarsınız. Öncelikle, ResetPassword
bildirimin kendi uygulaması oluşturmanız gerekir.
<?php
namespace App\Notifications;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
class ResetPassword extends Notification
{
public $token;
public function __construct($token)
{
$this->token = $token;
}
public function via($notifiable)
{
return ['mail'];
}
public function toMail($notifiable)
{
return (new MailMessage)
->subject('Your Reset Password Subject Here')
->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.');
}
}
Ayrıca esnaf komutunu kullanarak bildirim şablonu oluşturabilir:
hadi ResetPassword.php
adında izin app\Notifications
dizinde içinde yeni bildirim sınıf oluşturun
php artisan make:notification ResetPassword
Veya sadece kopyala-yapıştır yapabilirsiniz Yukarıdaki kod. Fark edeceğiniz gibi bu bildirim sınıfı varsayılan Illuminate\Auth\Notifications\ResetPassword
ile oldukça benzer. Aslında sadece varsayılan ResetPassword
sınıftan uzatabilirsiniz.
Tek fark burada, sizi e-postanın konusunu tanımlamak için yeni bir yöntem çağrısı ekleyin:
return (new MailMessage)
->subject('Your Reset Password Subject Here')
Sen Mail Notifications here hakkında daha fazla okuyabilirsiniz.
İkincisi, sizin app\User.php
dosyanızda, Illuminate\Auth\Passwords\CanResetPassword
özelliğiyle tanımlanmış varsayılan sendPasswordResetNotification()
yöntemini geçersiz kılmanız gerekir.
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Notifications\ResetPassword as ResetPasswordNotification;
class User extends Authenticatable
{
use Notifiable;
...
public function sendPasswordResetNotification($token)
{
// Your your own implementation.
$this->notify(new ResetPasswordNotification($token));
}
}
Ve şimdi şifre sıfırlama e-posta konusu güncellenmesi gerekir: Şimdi kendi ResetPassword
uygulaması kullanmalısınız!

Umut bu yardım!
ve üstte yazılan Laravel ve Laravel konularını nasıl değiştirebiliriz? – Steve
@Steve Config/app.php adresine gidin ve uygulama adını değiştirin – kniteli