finish implementing mails
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Mail;
|
||||
|
||||
use App\Models\Core\Mail\MailTemplate;
|
||||
use App\Repositories\Shop\Invoices;
|
||||
use App\Repositories\Shop\Traits\MailCustomers;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
@@ -14,18 +15,42 @@ class Acheminement extends TemplateMailable
|
||||
|
||||
protected static $templateModelClass = MailTemplate::class;
|
||||
|
||||
public $user;
|
||||
public $email;
|
||||
|
||||
public $male;
|
||||
public $nom;
|
||||
|
||||
public $prenom;
|
||||
|
||||
public $societe;
|
||||
|
||||
public $subject;
|
||||
|
||||
public $url;
|
||||
public $numero_suivi;
|
||||
|
||||
public function __construct($user, $subject = '')
|
||||
public $numero_commande;
|
||||
|
||||
public $adresse;
|
||||
|
||||
public $cp;
|
||||
|
||||
public $ville;
|
||||
|
||||
public $date_expedition;
|
||||
|
||||
public $facture;
|
||||
|
||||
public function __construct($order)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->male = $user->gender == 1;
|
||||
$this->subject = $subject;
|
||||
$this->prenom = $order->customer->first_name;
|
||||
$this->nom = $order->customer->last_name;
|
||||
$this->adresse = $order->address->address;
|
||||
$this->cp = $order->address->zipcode;
|
||||
$this->ville = $order->address->city;
|
||||
$this->societe = $order->customer->company;
|
||||
$this->email = $order->customer->email;
|
||||
$this->numero_suivi = $order->delivery_ref;
|
||||
$this->numero_commande = $order->ref;
|
||||
$this->date_expedition = $order->updated_at;
|
||||
$this->facture = Invoices::getInvoiceHtml($order->invoice->id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,12 +24,12 @@ class Preparation extends TemplateMailable
|
||||
|
||||
public $subject;
|
||||
|
||||
public function __construct($user, $subject = '')
|
||||
public function __construct($order)
|
||||
{
|
||||
$this->prenom = $user->first_name;
|
||||
$this->nom = $user->last_name;
|
||||
$this->societe = $user->society;
|
||||
$this->email = $user->email;
|
||||
$this->prenom = $order->customer->first_name;
|
||||
$this->nom = $order->customer->last_name;
|
||||
$this->societe = $order->customer->company;
|
||||
$this->email = $order->customer->email;
|
||||
$this->subject = $subject;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user