finish implementing mails
This commit is contained in:
@@ -8,6 +8,20 @@ use App\Models\Shop\Invoice;
|
||||
|
||||
class Invoices
|
||||
{
|
||||
public static function getInvoiceHtml($id)
|
||||
{
|
||||
$invoice = self::get($id, ['order.customer', 'order.address', 'order.detail']);
|
||||
$order = $invoice->order;
|
||||
$customer = $order->customer;
|
||||
unset($invoice->order, $order->customer);
|
||||
$data = [
|
||||
'invoice' => $invoice->toArray(),
|
||||
'order' => $order->toArray(),
|
||||
'customer' => $customer->toArray(),
|
||||
];
|
||||
return view('Shop.Invoices.mail', $data)->render();
|
||||
}
|
||||
|
||||
public static function getByUUID($uuid)
|
||||
{
|
||||
return Invoice::byUUID($uuid)->first();
|
||||
|
||||
Reference in New Issue
Block a user