- Gửi email theo template cho 1 khách, tab lịch sử email, nhắc gia hạn dịch vụ hàng loạt - Mail lưu from/bcc/sent_by; mẫu MARKETING và mẫu cũ trong TemplateSeeder - Gói hosting: giới hạn, trạng thái, lấy plan Plesk qua CLI gateway - Backfill payment_method và ngày đơn hàng còn thiếu - Bổ sung field CPU/RAM/Disk/Băng thông cho loại sản phẩm vps và cloud Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
84 lines
5.6 KiB
PHP
84 lines
5.6 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\Api\Admin\Customer\CustomerController;
|
|
use App\Http\Controllers\Api\Admin\Service\ServiceController;
|
|
use App\Http\Controllers\Api\Admin\Service\ServiceRenewalReminderController;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
// Customers (module: customer)
|
|
Route::prefix('customers')
|
|
->controller(CustomerController::class)
|
|
->group(function () {
|
|
Route::get('trash', 'trash')->middleware('perm:customer.view');
|
|
Route::get('vps/available', 'listAvailableVms')->middleware('perm:customer.view');
|
|
Route::get('/', 'index')->middleware('perm:customer.view');
|
|
Route::post('/', 'store')->middleware('perm:customer.create');
|
|
Route::get('{uuid}', 'show')->middleware('perm:customer.view');
|
|
Route::put('{uuid}', 'update')->middleware('perm:customer.edit');
|
|
Route::delete('{uuid}', 'destroy')->middleware('perm:customer.destroy');
|
|
Route::delete('{uuid}/destroy', 'destroy')->middleware('perm:customer.destroy');
|
|
Route::post('{uuid}/reset-password', 'resetPassword')->middleware('perm:customer.edit');
|
|
Route::post('{uuid}/send-password', 'sendPasswordEmail')->middleware('perm:customer.edit');
|
|
Route::post('{uuid}/email-layout', 'emailLayout')->middleware('perm:customer.edit');
|
|
Route::post('{uuid}/email-preview', 'emailPreview')->middleware('perm:customer.edit');
|
|
Route::post('{uuid}/send-email', 'sendEmail')->middleware('perm:customer.edit');
|
|
Route::get('{uuid}/emails', 'emails')->middleware('perm:customer.view');
|
|
Route::get('{uuid}/emails/{id}', 'emailDetail')->whereNumber('id')->middleware('perm:customer.view');
|
|
Route::post('{uuid}/login-as', 'loginAs')->middleware('perm:customer.edit');
|
|
Route::post('{uuid}/add-credit', 'addCredit')->middleware('perm:customer.edit');
|
|
Route::post('{uuid}/add-total', 'addTotal')->middleware('perm:customer.edit');
|
|
Route::get('{uuid}/services', 'getServices')->middleware('perm:customer.view');
|
|
Route::post('{uuid}/services', 'createService')->middleware('perm:customer.edit');
|
|
Route::post('{uuid}/services/bulk-delete', 'bulkDeleteServices')->middleware(
|
|
'perm:customer.edit',
|
|
);
|
|
Route::put('{uuid}/services/{serviceId}', 'updateService')->middleware('perm:customer.edit');
|
|
Route::post('{uuid}/services/{serviceId}/change-ip', 'changeServiceIp')->middleware('perm:customer.edit');
|
|
Route::post('{uuid}/services/{serviceId}/change-port', 'changeServicePort')->middleware('perm:customer.edit');
|
|
Route::post('{uuid}/services/{serviceId}/notify-renew', 'notifyServiceRenewal')->middleware('perm:customer.edit');
|
|
Route::get('{uuid}/notes', 'getCustomerNotes')->middleware('perm:customer.view');
|
|
Route::post('{uuid}/notes', 'storeCustomerNote')->middleware('perm:customer.edit');
|
|
Route::delete('{uuid}/notes/{noteId}', 'destroyCustomerNote')->middleware('perm:customer.edit');
|
|
Route::get('{uuid}/services/{serviceId}/notes', 'getServiceNotes')->middleware('perm:customer.view');
|
|
Route::post('{uuid}/services/{serviceId}/notes', 'storeServiceNote')->middleware('perm:customer.edit');
|
|
Route::delete('{uuid}/services/{serviceId}/notes/{noteId}', 'destroyServiceNote')->middleware(
|
|
'perm:customer.edit',
|
|
);
|
|
Route::get('{uuid}/orders', 'getOrders')->middleware('perm:customer.view');
|
|
Route::put('{uuid}/orders/{orderId}', 'updateOrder')->middleware('perm:customer.edit');
|
|
Route::get('{uuid}/invoices', 'getInvoices')->middleware('perm:customer.view');
|
|
Route::put('{uuid}/invoices/{invoiceId}', 'updateInvoice')->middleware(
|
|
'perm:customer.edit',
|
|
);
|
|
Route::get('{uuid}/transactions', 'getTransactions')->middleware('perm:customer.view');
|
|
Route::put('{uuid}/transactions/{transactionId}', 'updateTransaction')->middleware(
|
|
'perm:customer.edit',
|
|
);
|
|
Route::get('{uuid}/domains', 'getDomains')->middleware('perm:customer.view');
|
|
Route::get('{uuid}/dns-domains', 'getDnsDomains')->middleware('perm:customer.view');
|
|
Route::get('{uuid}/dns-domains/{domainId}/records', 'getDnsDomainRecords')->middleware(
|
|
'perm:customer.view',
|
|
);
|
|
Route::patch('{uuid}/status', 'updateStatus')->middleware('perm:customer.edit');
|
|
Route::post('bulk-delete', 'bulkDelete')->middleware('perm:customer.destroy');
|
|
Route::post('bulk-restore', 'bulkRestore')->middleware('perm:customer.edit');
|
|
Route::post('bulk-force-delete', 'bulkForceDelete')->middleware('perm:customer.destroy');
|
|
Route::post('bulk-status', 'bulkStatus')->middleware('perm:customer.edit');
|
|
Route::post('{uuid}/restore', 'restore')->middleware('perm:customer.edit');
|
|
Route::delete('{uuid}/force', 'forceDelete')->middleware('perm:customer.destroy');
|
|
});
|
|
|
|
// Services (module: customer)
|
|
Route::prefix('services/renewal-reminders')->controller(ServiceRenewalReminderController::class)->group(function () {
|
|
Route::get('/', 'index')->middleware('perm:customer.view');
|
|
Route::post('/', 'send')->middleware('perm:customer.edit');
|
|
});
|
|
|
|
Route::prefix('services')->controller(ServiceController::class)->group(function () {
|
|
Route::get('/', 'index')->middleware('perm:customer.view');
|
|
Route::post('bulk-action', 'bulkAction')->middleware('perm:customer.edit');
|
|
Route::get('{id}', 'show')->middleware('perm:customer.view');
|
|
Route::patch('{id}/detach-customer', 'detachCustomer')->middleware('perm:customer.edit');
|
|
Route::post('{id}/resend-credentials', 'resendCredentials')->middleware('perm:customer.edit');
|
|
});
|