FleetCart/Modules/Order/Http/Controllers/Admin/OrderEmailController.php

25 lines
597 B
PHP
Raw Permalink Normal View History

2023-06-11 12:14:03 +00:00
<?php
namespace Modules\Order\Http\Controllers\Admin;
use Modules\Order\Entities\Order;
use Modules\Checkout\Mail\Invoice;
use Illuminate\Support\Facades\Mail;
class OrderEmailController
{
/**
* Store a newly created resource in storage.
*
* @param \Modules\Order\Entities\Order $order
* @return \Illuminate\Http\Response
*/
public function store(Order $order)
{
Mail::to($order->customer_email)
->send(new Invoice($order));
return back()->with('success', trans('order::messages.invoice_sent'));
}
}