mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-22 07:30:25 +00:00
update
This commit is contained in:
parent
a6c5017eb2
commit
411afd45b3
2 changed files with 17 additions and 0 deletions
|
@ -300,6 +300,10 @@ class DomainResource extends Resource
|
||||||
->searchable()
|
->searchable()
|
||||||
->sortable(),
|
->sortable(),
|
||||||
|
|
||||||
|
Tables\Columns\TextColumn::make('domain_root')
|
||||||
|
->searchable()
|
||||||
|
->sortable(),
|
||||||
|
|
||||||
Tables\Columns\TextColumn::make('hostingSubscription.customer.name')
|
Tables\Columns\TextColumn::make('hostingSubscription.customer.name')
|
||||||
->searchable()
|
->searchable()
|
||||||
->sortable(),
|
->sortable(),
|
||||||
|
|
|
@ -120,6 +120,19 @@ class Domain extends Model
|
||||||
throw new \Exception('Hosting plan not found');
|
throw new \Exception('Hosting plan not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($this->domain_root)) {
|
||||||
|
if ($this->is_main == 1) {
|
||||||
|
$this->domain_root = '/home/'.$findHostingSubscription->system_username;
|
||||||
|
$this->domain_public = '/home/'.$findHostingSubscription->system_username.'/public_html';
|
||||||
|
$this->home_root = '/home/'.$findHostingSubscription->system_username;
|
||||||
|
} else {
|
||||||
|
$this->domain_root = '/home/'.$findHostingSubscription->system_username.'/domains/'.$this->domain;
|
||||||
|
$this->domain_public = $this->domain_root.'/public_html';
|
||||||
|
$this->home_root = '/home/'.$findHostingSubscription->system_username;
|
||||||
|
}
|
||||||
|
$this->save();
|
||||||
|
}
|
||||||
|
|
||||||
if (!is_dir($this->domain_root)) {
|
if (!is_dir($this->domain_root)) {
|
||||||
mkdir($this->domain_root, 0711, true);
|
mkdir($this->domain_root, 0711, true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue