feat: Implement Plesk domain and hosting services
- Added PleskDomainService for managing domain operations (create, update, remove, get info). - Introduced PleskHostingService for provisioning hosting accounts and notifying customers. - Created PleskService for handling API requests to Plesk. - Added migration to include 'type' column in dns_manager_servers table. - Created migration for module_hosting_accounts table to track hosting subscriptions. - Created migration for module_hosting_plesk_clients table to manage Plesk client credentials. - Added email templates for notifying customers and admins about hosting account creation.
This commit is contained in:
@@ -74,6 +74,7 @@ class ServerController extends Controller
|
||||
'password' => 'required|string|max:255',
|
||||
'api_key' => 'nullable|string',
|
||||
'status' => 'nullable|string|in:activated,Stopped',
|
||||
'type' => 'nullable|string|in:domain,hosting,both',
|
||||
]);
|
||||
|
||||
DB::beginTransaction();
|
||||
@@ -86,6 +87,7 @@ class ServerController extends Controller
|
||||
'password' => Crypt::encryptString($validated['password']),
|
||||
'api_key' => $validated['api_key'] ?? null,
|
||||
'status' => $validated['status'] ?? 'activated',
|
||||
'type' => $validated['type'] ?? 'domain',
|
||||
]);
|
||||
|
||||
DB::commit();
|
||||
@@ -116,6 +118,7 @@ class ServerController extends Controller
|
||||
'password' => 'nullable|string|max:255',
|
||||
'api_key' => 'nullable|string',
|
||||
'status' => 'nullable|string|in:activated,Stopped',
|
||||
'type' => 'nullable|string|in:domain,hosting,both',
|
||||
]);
|
||||
|
||||
DB::beginTransaction();
|
||||
@@ -182,6 +185,7 @@ class ServerController extends Controller
|
||||
'username' => $server->username,
|
||||
'api_key' => $server->api_key,
|
||||
'status' => $server->status,
|
||||
'type' => $server->type,
|
||||
'created_at' => $server->created_at,
|
||||
'updated_at' => $server->updated_at,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user