update email template
This commit is contained in:
@@ -41,7 +41,7 @@ class DomainController extends Controller
|
||||
$customerName = trim((string) $request->get('customer_name', ''));
|
||||
|
||||
$query = $this->domainRepository->model
|
||||
->with(['server', 'customer'])
|
||||
->with(['server', 'customer', 'registrar'])
|
||||
->newQuery();
|
||||
|
||||
if ($filter) {
|
||||
@@ -77,7 +77,7 @@ class DomainController extends Controller
|
||||
public function show(int $id): JsonResponse
|
||||
{
|
||||
$domain = $this->domainRepository->model
|
||||
->with(['server', 'customer'])
|
||||
->with(['server', 'customer', 'registrar'])
|
||||
->find($id);
|
||||
|
||||
if (!$domain) {
|
||||
@@ -98,6 +98,7 @@ class DomainController extends Controller
|
||||
'customer_ids' => 'nullable|array',
|
||||
'customer_ids.*' => 'integer|exists:customers,id',
|
||||
'is_created' => 'nullable|integer|in:0,1,2',
|
||||
'registrar_id' => 'nullable|integer|exists:registrars,id',
|
||||
]);
|
||||
|
||||
DB::beginTransaction();
|
||||
@@ -106,6 +107,7 @@ class DomainController extends Controller
|
||||
'domain_name' => $request->domain_name,
|
||||
'dns_manager_server_id' => $request->dns_manager_server_id,
|
||||
'is_created' => $request->is_created ?? 0,
|
||||
'registrar_id' => $request->registrar_id,
|
||||
]);
|
||||
|
||||
if (!empty($request->customer_ids)) {
|
||||
@@ -138,6 +140,7 @@ class DomainController extends Controller
|
||||
'customer_ids' => 'nullable|array',
|
||||
'customer_ids.*' => 'integer|exists:customers,id',
|
||||
'is_created' => 'nullable|integer|in:0,1,2',
|
||||
'registrar_id' => 'nullable|integer|exists:registrars,id',
|
||||
]);
|
||||
|
||||
DB::beginTransaction();
|
||||
@@ -146,6 +149,7 @@ class DomainController extends Controller
|
||||
'domain_name',
|
||||
'dns_manager_server_id',
|
||||
'is_created',
|
||||
'registrar_id',
|
||||
]));
|
||||
|
||||
// Sync customers (empty array = detach all)
|
||||
@@ -202,6 +206,12 @@ class DomainController extends Controller
|
||||
'email' => $c->email,
|
||||
])->values()->toArray(),
|
||||
'is_created' => $domain->is_created,
|
||||
'registrar_id' => $domain->registrar_id,
|
||||
'registrar' => $domain->registrar ? [
|
||||
'id' => $domain->registrar->id,
|
||||
'name' => $domain->registrar->name,
|
||||
'short_name' => $domain->registrar->short_name,
|
||||
] : null,
|
||||
'created_at' => $domain->created_at,
|
||||
'updated_at' => $domain->updated_at,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user