Added initial order confirmation e-mail template #48
This commit is contained in:
+50
-2
@@ -8,15 +8,18 @@
|
||||
use App\Models\Invoice;
|
||||
use App\Http\Controllers\PaymentTermsController;
|
||||
use App\Http\Controllers\SettingController;
|
||||
use App\Mail\OrderConfirmation;
|
||||
use App\Support\ApiDataTransformer;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
|
||||
Route::get('customers/{id}', [CustomerController::class, 'single']);
|
||||
Route::get('customers', [CustomerController::class, 'index']);
|
||||
// ->middleware('auth:sanctum');
|
||||
|
||||
|
||||
// Route::apiResource('invoices', InvoiceController::class);
|
||||
// ->middleware('auth:sanctum');
|
||||
|
||||
Route::get('/invoices', [InvoiceController::class, 'index']);
|
||||
Route::post('/invoices', [InvoiceController::class, 'store']);
|
||||
Route::get('/invoices/{id}', [InvoiceController::class, 'single']);
|
||||
@@ -25,7 +28,52 @@
|
||||
|
||||
Route::get('/invoices/{id}/remind', function ($id) {
|
||||
$invoice = InvoiceController::single($id);
|
||||
return new Reminder($invoice);
|
||||
Mail::to('daniel@vollstock.de')->send(new Reminder($invoice));
|
||||
// return new Reminder($invoice);
|
||||
});
|
||||
|
||||
Route::get('/offers/{id}/confirmation', function ($id) {
|
||||
// $offer = offerController::single($id);
|
||||
$offer = [
|
||||
'nr' => 0,
|
||||
'offerDate' => '2025-10-01',
|
||||
'orderDate' => '2025-10-28',
|
||||
'customerId' => 0,
|
||||
'customer' => [
|
||||
'companyName' => '',
|
||||
'vatId' => '',
|
||||
'billingAddress' => [
|
||||
'lineOne' => '',
|
||||
'lineTwo' => '',
|
||||
'city' => '',
|
||||
'postalCode' => '',
|
||||
'countryCode' => 'DE',
|
||||
]
|
||||
],
|
||||
'contact' => [
|
||||
'salutation' => 'Frau',
|
||||
'firstName' => '',
|
||||
'lastName' => '',
|
||||
'email' => '',
|
||||
'phone' => '',
|
||||
'position' => null,
|
||||
'isPrimary' => false,
|
||||
'avatar' => null,
|
||||
],
|
||||
'totalAmount' => '13575.88',
|
||||
'title' => "",
|
||||
'text' => '',
|
||||
'items' => [],
|
||||
'paymentTerms' => [
|
||||
'name' => 'onReceipt',
|
||||
'description' => 'Bei Rechnungserhalt',
|
||||
'isFixed' => true,
|
||||
'days' => null,
|
||||
]
|
||||
];
|
||||
|
||||
// Mail::to('')->cc([''])->send(new OrderConfirmation($offer));
|
||||
return new OrderConfirmation($offer);
|
||||
});
|
||||
|
||||
Route::get('/paymentterms', [PaymentTermsController::class, 'index']);
|
||||
|
||||
Reference in New Issue
Block a user