update 20.10.2025
This commit is contained in:
parent
8c11130b5d
commit
a939cd51ef
616 changed files with 84821 additions and 4121 deletions
59
dev/app-bak/Mail/MailContact.php
Normal file
59
dev/app-bak/Mail/MailContact.php
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
namespace App\Mail;
|
||||
|
||||
use App\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use App\Services\Util;
|
||||
|
||||
class MailContact extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $user_shop;
|
||||
public $subject;
|
||||
public $data;
|
||||
|
||||
|
||||
public function __construct($data)
|
||||
{
|
||||
$this->data = $data;
|
||||
$this->user_shop = Util::getUserShop();
|
||||
$this->subject = __('email.your_request_from').' mivita.care';
|
||||
if($this->user_shop){
|
||||
$this->subject = __('email.your_request_from')." ".$this->user_shop->slug.'.mivita.care';
|
||||
}
|
||||
}
|
||||
|
||||
public function build()
|
||||
{
|
||||
$salutation = __('email.hello');
|
||||
if(isset($this->data['first_name'])){
|
||||
$salutation .= " ".$this->data['first_name'];
|
||||
}
|
||||
|
||||
if(isset($this->data['salutation'])){
|
||||
if($this->data['salutation'] === 'mr'){
|
||||
$this->data['salutation'] = 'Herr';
|
||||
}
|
||||
if($this->data['salutation'] === 'ms'){
|
||||
$this->data['salutation'] = 'Frau';
|
||||
}
|
||||
}
|
||||
$copy1line = __('email.your_request_from')." mivita.care";
|
||||
if($this->user_shop){
|
||||
$copy1line = __('email.your_request_from')." ".$this->user_shop->slug.'.mivita.care';
|
||||
}
|
||||
|
||||
return $this->view('emails.contact')->with([
|
||||
'salutation' => $salutation,
|
||||
'copy1line' => $copy1line,
|
||||
'data' => $this->data,
|
||||
'copy3line' => __('email.copy3line'),
|
||||
'greetings' => __('email.greetings'),
|
||||
'sender' => __('email.sender'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue