Merge pull request #3301 from CihanSenturk/fix-resend-pasword-issue

Fixed resend password email issue
This commit is contained in:
Cihan Şentürk 2025-07-21 15:14:45 +03:00 committed by GitHub
commit c059ad261c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 26 additions and 9 deletions

View File

@ -42,9 +42,10 @@ class Invitation extends Notification
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
public function toMail($notifiable): MailMessage
{
return (new MailMessage)
->from(config('mail.from.address'), config('mail.from.name'))
->line(trans('auth.invitation.message_1'))
->action(trans('auth.invitation.button'), route('register', $this->invitation->token))
->line(trans('auth.invitation.message_2'));

View File

@ -14,10 +14,18 @@ class Reset extends Notification
*/
public $token;
/**
* The email address.
*
* @var string
*/
public $email;
/**
* Create a notification instance.
*
* @param string $token
* @param string $email
*/
public function __construct($token, $email)
{
@ -42,9 +50,10 @@ class Reset extends Notification
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
public function toMail($notifiable): MailMessage
{
return (new MailMessage)
->from(config('mail.from.address'), config('mail.from.name'))
->line(trans('auth.notification.message_1'))
->action(trans('auth.notification.button'), route('reset', ['token' => $this->token, 'email' => $this->email]))
->line(trans('auth.notification.message_2'));

View File

@ -49,9 +49,10 @@ class DownloadCompleted extends Notification implements ShouldQueue
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
public function toMail($notifiable): MailMessage
{
return (new MailMessage)
->from(config('mail.from.address'), config('mail.from.name'))
->subject(trans('notifications.download.completed.title'))
->line(new HtmlString('<br><br>'))
->line(trans('notifications.download.completed.description'))

View File

@ -48,9 +48,10 @@ class DownloadFailed extends Notification implements ShouldQueue
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
public function toMail($notifiable): MailMessage
{
return (new MailMessage)
->from(config('mail.from.address'), config('mail.from.name'))
->subject(trans('notifications.download.failed.title'))
->line(new HtmlString('<br><br>'))
->line(trans('notifications.download.failed.description'))

View File

@ -49,9 +49,10 @@ class ExportCompleted extends Notification implements ShouldQueue
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
public function toMail($notifiable): MailMessage
{
return (new MailMessage)
->from(config('mail.from.address'), config('mail.from.name'))
->subject(trans('notifications.export.completed.title'))
->line(new HtmlString('<br><br>'))
->line(trans('notifications.export.completed.description'))

View File

@ -48,9 +48,10 @@ class ExportFailed extends Notification implements ShouldQueue
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
public function toMail($notifiable): MailMessage
{
return (new MailMessage)
->from(config('mail.from.address'), config('mail.from.name'))
->subject(trans('notifications.export.failed.title'))
->line(new HtmlString('<br><br>'))
->line(trans('notifications.export.failed.description'))

View File

@ -44,11 +44,12 @@ class ImportCompleted extends Notification implements ShouldQueue
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
public function toMail($notifiable): MailMessage
{
$dashboard_url = route('dashboard', ['company_id' => company_id()]);
return (new MailMessage)
->from(config('mail.from.address'), config('mail.from.name'))
->subject(trans('notifications.import.completed.title'))
->line(new HtmlString('<br><br>'))
->line(trans('notifications.import.completed.description'))

View File

@ -48,9 +48,10 @@ class ImportFailed extends Notification implements ShouldQueue
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
public function toMail($notifiable): MailMessage
{
$message = (new MailMessage)
->from(config('mail.from.address'), config('mail.from.name'))
->subject(trans('notifications.import.failed.title'))
->line(new HtmlString('<br><br>'))
->line(trans('notifications.import.failed.description'));

View File

@ -49,11 +49,12 @@ class InvalidEmail extends Notification implements ShouldQueue
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
public function toMail($notifiable): MailMessage
{
$dashboard_url = route('dashboard', ['company_id' => company_id()]);
return (new MailMessage)
->from(config('mail.from.address'), config('mail.from.name'))
->subject(trans('notifications.email.invalid.title', ['type' => $this->type]))
->line(new HtmlString('<br><br>'))
->line(trans('notifications.email.invalid.description', ['email' => $this->email]))