user shop sites

This commit is contained in:
Kevin Adametz 2019-02-07 17:25:43 +01:00
parent 22a2b4710a
commit dc857e88d5
37 changed files with 2044 additions and 869 deletions

50
app/Mail/MailContact.php Normal file
View file

@ -0,0 +1,50 @@
<?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 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 = __('Anfrage von mivita.care');
if($this->user_shop){
$this->subject = __('Anfrage von '.$this->user_shop->slug.'.mivita.care');
}
}
public function build()
{
$salutation = __('Dear customer').",";
$copy1line = __('Deine Anfrage von mivita.care');
if($this->user_shop){
$copy1line = __('Deine Anfrage von '.$this->user_shop->slug.'.mivita.care');
}
return $this->view('emails.contact')->with([
'salutation' => $salutation,
'copy1line' => $copy1line,
'data' => $this->data,
'copy3line' => __('For further questions we are happy to help you.'),
'greetings' => __('Best regards'),
'sender' => __('your mivita.care team'),
]);
}
}