mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
Update HostingSubscriptionsController.php
This commit is contained in:
parent
d43c776c65
commit
8231c20ed4
1 changed files with 9 additions and 0 deletions
|
@ -27,6 +27,15 @@ class HostingSubscriptionsController extends ApiController
|
|||
|
||||
public function store(HostingSubscriptionCreateRequest $request)
|
||||
{
|
||||
|
||||
$findDomain = Domain::where('domain', $request->domain)->first();
|
||||
if ($findDomain) {
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'message' => 'Domain already exists',
|
||||
], 400);
|
||||
}
|
||||
|
||||
$hostingSubscription = new HostingSubscription();
|
||||
$hostingSubscription->customer_id = $request->customer_id;
|
||||
$hostingSubscription->hosting_plan_id = $request->hosting_plan_id;
|
||||
|
|
Loading…
Reference in a new issue