23-01-2026
This commit is contained in:
parent
a939cd51ef
commit
a8b395e20d
248 changed files with 29342 additions and 4805 deletions
61
app/Mail/UserRestoreEmail.php
Normal file
61
app/Mail/UserRestoreEmail.php
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use App\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class UserRestoreEmail extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $user;
|
||||
public $subject;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @param User $user
|
||||
*/
|
||||
public function __construct(User $user)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->subject = __('email.user_restore_subject');
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
// Sicherstellen, dass account geladen ist
|
||||
if (!$this->user->account) {
|
||||
$this->user->load('account');
|
||||
}
|
||||
|
||||
$firstName = $this->user->account ? $this->user->account->first_name : '';
|
||||
|
||||
$title = __('email.user_restore_title');
|
||||
$greeting = __('email.user_restore_greeting', ['name' => $firstName]);
|
||||
$copy1line = __('email.user_restore_copy1line');
|
||||
$copy2line = __('email.user_restore_copy2line');
|
||||
$copy3line = __('email.user_restore_copy3line');
|
||||
$payment_account_date = $this->user->getPaymentAccountDateFormat();
|
||||
$reset_password_url = route('password.request');
|
||||
|
||||
return $this->view('emails.user_restore')->with([
|
||||
'title' => $title,
|
||||
'greeting' => $greeting,
|
||||
'copy1line' => $copy1line,
|
||||
'copy2line' => $copy2line,
|
||||
'copy3line' => $copy3line,
|
||||
'payment_account_date' => $payment_account_date,
|
||||
'reset_password_url' => $reset_password_url,
|
||||
'user' => $this->user,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue