mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-25 00:50:32 +00:00
Update HostingSubscription.php
This commit is contained in:
parent
a7f6c59818
commit
d43c776c65
1 changed files with 4 additions and 0 deletions
|
@ -41,6 +41,10 @@ class HostingSubscription extends Model
|
||||||
parent::boot();
|
parent::boot();
|
||||||
|
|
||||||
static::creating(function ($model) {
|
static::creating(function ($model) {
|
||||||
|
$findDomain = Domain::where('domain', $model->domain)->first();
|
||||||
|
if ($findDomain) {
|
||||||
|
throw new \Exception('Domain already exists');
|
||||||
|
}
|
||||||
$create = $model->_createLinuxWebUser($model);
|
$create = $model->_createLinuxWebUser($model);
|
||||||
if (isset($create['system_username']) && isset($create['system_password'])) {
|
if (isset($create['system_username']) && isset($create['system_password'])) {
|
||||||
$model->system_username = $create['system_username'];
|
$model->system_username = $create['system_username'];
|
||||||
|
|
Loading…
Reference in a new issue