Update DomainIsCreatedListener.php
This commit is contained in:
parent
e574342c86
commit
000a0db564
1 changed files with 8 additions and 2 deletions
|
@ -3,7 +3,9 @@
|
|||
namespace Modules\Microweber\Listeners;
|
||||
|
||||
use App\Events\DomainIsCreated;
|
||||
use App\Models\Domain;
|
||||
use App\Models\HostingPlan;
|
||||
use App\Models\HostingSubscription;
|
||||
use App\ShellApi;
|
||||
use Modules\Microweber\App\Models\MicroweberInstallation;
|
||||
use Psy\Shell;
|
||||
|
@ -23,12 +25,16 @@ class DomainIsCreatedListener
|
|||
*/
|
||||
public function handle(DomainIsCreated $event): void
|
||||
{
|
||||
$findDomain = \App\Models\Domain::where('id', $event->model->id)->first();
|
||||
$findDomain = Domain::where('id', $event->model->id)->first();
|
||||
if (!$findDomain) {
|
||||
return;
|
||||
}
|
||||
$findHostingSubscription = HostingSubscription::where('id', $findDomain->hosting_subscription_id)->first();
|
||||
if (!$findHostingSubscription) {
|
||||
return;
|
||||
}
|
||||
|
||||
$findHostingPlan = HostingPlan::where('id', $findDomain->hosting_plan_id)->first();
|
||||
$findHostingPlan = HostingPlan::where('id', $findHostingSubscription->hosting_plan_id)->first();
|
||||
if (!$findHostingPlan) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue