defaults('modelType', 'customer') ->name('customers.notes.index'); Route::post('/customers/{id}/notes', [NoteController::class, 'store']) ->defaults('modelType', 'customer') ->name('customers.notes.store'); Route::delete('/notes/{id}', [NoteController::class, 'delete']); Route::get('/todo-types', function () { return \App\Models\TodoType::all(); }); Route::apiResource('/todos', TodoController::class); Route::get('/products/', [ProductController::class, 'index']); Route::get('/products/{id}', [ProductController::class, 'single']); Route::get('/invoices/summary', [InvoiceController::class, 'summaryAll']); Route::get('/invoices/summaryThisYear', [InvoiceController::class, 'summaryThisYear']); Route::get('/invoices/summaryBeforeThisYear', [InvoiceController::class, 'summaryBeforeThisYear']); Route::get('/invoices/salesStatistics', [InvoiceController::class, 'salesStatistics']); Route::get('/invoices', [InvoiceController::class, 'index']); Route::post('/invoices', [InvoiceController::class, 'store']); Route::get('/invoices/{id}', [InvoiceController::class, 'single']); Route::put('/invoices/{id}', [InvoiceController::class, 'update']); Route::delete('/invoices/{id}', [InvoiceController::class, 'delete']); Route::get('/invoices/{id}/remind', [InvoiceController::class, 'remind']); Route::get('/lineitems/{invoiceId}', [LineItemController::class, 'index']); Route::get('/offers/{id}/confirm', 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' => 'Claudia', 'lastName' => 'Mustermann', 'email' => '', 'phone' => '', 'position' => null, 'isPrimary' => false, 'avatar' => null, ], 'totalAmount' => '84.033', 'title' => "Angebots-Titel", 'text' => '', 'items' => [], 'paymentTerms' => [ 'name' => 'onReceipt', 'description' => 'Bei Rechnungserhalt', 'isFixed' => true, 'days' => 14, ] ]; // Mail::to('')->cc([''])->send(new OrderConfirmation($offer)); return new OrderConfirmation($offer); }); Route::get('/paymentterms', [PaymentTermsController::class, 'index']); Route::get('/settings', [SettingController::class, 'index']); Route::post('/settings', [SettingController::class, 'update']);