mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
Update DomainIsCreatedListener.php
This commit is contained in:
parent
c274d89d5f
commit
aff951e9d6
1 changed files with 16 additions and 5 deletions
|
@ -11,6 +11,7 @@ use App\Models\HostingSubscription;
|
|||
use App\Services\HostingSubscriptionService;
|
||||
use Illuminate\Support\Str;
|
||||
use MicroweberPackages\SharedServerScripts\MicroweberWhitelabelSettingsUpdater;
|
||||
use MicroweberPackages\SharedServerScripts\MicroweberWhitelabelWebsiteApply;
|
||||
use Modules\Microweber\App\Models\MicroweberInstallation;
|
||||
|
||||
class DomainIsCreatedListener
|
||||
|
@ -143,12 +144,22 @@ class DomainIsCreatedListener
|
|||
|
||||
if (isset($status['success']) && $status['success']) {
|
||||
|
||||
$whiteLabelSettings = [];
|
||||
$whiteLabelSettings['website_manager_url'] = $website_manager_url;
|
||||
$sharedAppPath = config('microweber.sharedPaths.app');
|
||||
// $whitelabelSettings = setting('microweber.whitelabel');
|
||||
// $whitelabelSettings['website_manager_url'] = setting('microweber.website_manager_url');
|
||||
//
|
||||
// $whitelabel = new MicroweberWhitelabelSettingsUpdater();
|
||||
// $whitelabel->setPath($sharedAppPath);
|
||||
// $whitelabel->apply($whitelabelSettings);
|
||||
|
||||
$whitelabel = new MicroweberWhitelabelSettingsUpdater();
|
||||
$whitelabel->setPath($findDomain->domain_public);
|
||||
$whitelabel->apply($whiteLabelSettings);
|
||||
try {
|
||||
$whitelabelApply = new MicroweberWhitelabelWebsiteApply();
|
||||
$whitelabelApply->setWebPath($findDomain->domain_public);
|
||||
$whitelabelApply->setSharedPath($sharedAppPath);
|
||||
$whitelabelApply->apply();
|
||||
} catch (\Exception $e) {
|
||||
// \Log::error('Error applying whitelabel to website: ' . $mwInstallation->installation_path);
|
||||
}
|
||||
|
||||
$findInstallation = MicroweberInstallation::where('installation_path', $findDomain->domain_public)
|
||||
->where('domain_id', $findDomain->id)
|
||||
|
|
Loading…
Reference in a new issue