Updates to 03-2025
This commit is contained in:
parent
6167273a48
commit
9b54eb0512
348 changed files with 34535 additions and 5774 deletions
|
|
@ -67,8 +67,8 @@ class MailCheckout extends Mailable
|
|||
'greetings' => __('email.greetings'),
|
||||
'sender' => __('email.sender'),
|
||||
'send_link' => $this->send_link,
|
||||
'url' => Util::getMyMivitaUrl(),
|
||||
'button' => Util::getMyMivitaUrl(false),
|
||||
'url' => Util::getMyUrl(),
|
||||
'button' => Util::getMyUrl(false),
|
||||
'mode' => $this->mode
|
||||
]);
|
||||
}else{
|
||||
|
|
|
|||
63
app/Mail/MailLog.php
Normal file
63
app/Mail/MailLog.php
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
namespace App\Mail;
|
||||
|
||||
use App\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
class MailLog extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
protected $channel;
|
||||
protected $context;
|
||||
protected $message;
|
||||
protected $data;
|
||||
|
||||
public $subject;
|
||||
|
||||
public function __construct($channel, $context, $message, $data)
|
||||
{
|
||||
$this->channel = $channel;
|
||||
$this->context = $context;
|
||||
$this->message = $message;
|
||||
$this->data = $data;
|
||||
$this->subject = 'mivita Log';
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function build()
|
||||
{
|
||||
$title = 'Log: '.$this->channel.' '.$this->context;
|
||||
|
||||
//make Data readable
|
||||
$this->data = json_encode($this->data, JSON_PRETTY_PRINT);
|
||||
$content = "";
|
||||
|
||||
|
||||
$content .= "\n";
|
||||
$content .= "Channel: ".$this->channel."\n";
|
||||
$content .= "Context: ".$this->context."\n";
|
||||
if(\Auth::check()){
|
||||
$content .= "From User: ".\Auth::user()->id." | ".\Auth::user()->email."\n";
|
||||
}
|
||||
$content .= "\n";
|
||||
$content .= "Message: ".$this->message."\n";
|
||||
$content .= "\n";
|
||||
$content .= "Data: ".$this->data."\n";
|
||||
$content .= "\n";
|
||||
$content .= "\n";
|
||||
$content .= "Time: ".now()->format("d.m.Y H:i");
|
||||
$content .= "\n";
|
||||
$content .= request()->header('User-Agent');
|
||||
|
||||
|
||||
return $this->view('emails.sys')->with([
|
||||
'title' => $title,
|
||||
'content' => $content,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -12,14 +12,14 @@ class MailVerifyAccount extends Mailable
|
|||
use Queueable, SerializesModels;
|
||||
|
||||
protected $confirmation_code;
|
||||
protected $user;
|
||||
protected $userObj;
|
||||
public $subject;
|
||||
|
||||
|
||||
public function __construct($confirmation_code, User $user)
|
||||
public function __construct($confirmation_code, $userObj)
|
||||
{
|
||||
$this->confirmation_code = $confirmation_code;
|
||||
$this->user = $user;
|
||||
$this->userObj = $userObj;
|
||||
$this->subject = __('email.email_verify');
|
||||
}
|
||||
|
||||
|
|
@ -27,11 +27,11 @@ class MailVerifyAccount extends Mailable
|
|||
public function build()
|
||||
{
|
||||
$salutation = __('email.salutation').",";
|
||||
if($this->user->account){
|
||||
if($this->user->account->salutation === "mr"){
|
||||
$salutation = __('email.dear_sir')." ".$this->user->account->first_name.",";
|
||||
if($this->userObj){
|
||||
if($this->userObj->salutation === "mr"){
|
||||
$salutation = __('email.dear_sir')." ".$this->userObj->first_name.",";
|
||||
}else{
|
||||
$salutation = __('email.dear_mrs')." ".$this->user->account->first_name.",";
|
||||
$salutation = __('email.dear_mrs')." ".$this->userObj->first_name.",";
|
||||
}
|
||||
}
|
||||
return $this->view('emails.auth')->with([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue