update
This commit is contained in:
parent
23a68e300e
commit
f83c1a1ed4
7 changed files with 9 additions and 9 deletions
|
@ -75,7 +75,7 @@ class HostingAccountIsCreatedListener
|
|||
$websiteSslCertificate->certificate = $validateCertificates['certificate'];
|
||||
$websiteSslCertificate->private_key = $validateCertificates['private_key'];
|
||||
$websiteSslCertificate->certificate_chain = $validateCertificates['certificate_chain'];
|
||||
$websiteSslCertificate->user_id = $event->model->user_id;
|
||||
$websiteSslCertificate->customer_id = $event->model->customer_id;
|
||||
$websiteSslCertificate->is_active = 1;
|
||||
$websiteSslCertificate->is_wildcard = 0;
|
||||
$websiteSslCertificate->is_auto_renew = 1;
|
||||
|
|
|
@ -29,10 +29,10 @@ class ModelWebsiteCreatedListener
|
|||
return;
|
||||
}
|
||||
|
||||
dd($findWebsite);
|
||||
|
||||
$username = Str::slug($findWebsite->domain);
|
||||
|
||||
$email = $username . '@phyrepanel.test';
|
||||
$password = uniqid();
|
||||
|
||||
$newApacheWebsite = new ApacheWebsiteCreate();
|
||||
$newApacheWebsite->setDomain($findWebsite->domain);
|
||||
|
|
|
@ -29,7 +29,7 @@ class HostingSubscription extends Model
|
|||
|
||||
$createWebsite = new Website();
|
||||
$createWebsite->domain = $model->domain;
|
||||
$createWebsite->user_id = $model->customer_id;
|
||||
$createWebsite->customer_id = $model->customer_id;
|
||||
$createWebsite->hosting_plan_id = $model->hosting_plan_id;
|
||||
$createWebsite->save();
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ class Website extends Model
|
|||
'domain',
|
||||
'domain_root',
|
||||
'ip',
|
||||
'user_id',
|
||||
'customer_id',
|
||||
'is_active',
|
||||
'hosting_plan_id',
|
||||
];
|
||||
|
@ -39,6 +39,6 @@ class Website extends Model
|
|||
|
||||
public function customer()
|
||||
{
|
||||
return $this->hasOne(Customer::class, 'id', 'user_id');
|
||||
return $this->hasOne(Customer::class, 'id', 'customer_id');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ class WebsiteSslCertificate extends Model
|
|||
'certificate',
|
||||
'private_key',
|
||||
'certificate_chain',
|
||||
'user_id',
|
||||
'customer_id',
|
||||
'is_active',
|
||||
'is_wildcard',
|
||||
'is_auto_renew',
|
||||
|
|
|
@ -22,7 +22,7 @@ return new class extends Migration
|
|||
$table->string('home_root')->nullable();
|
||||
$table->string('screenshot')->nullable();
|
||||
|
||||
$table->integer('user_id')->nullable();
|
||||
$table->integer('customer_id')->nullable();
|
||||
$table->integer('is_active')->nullable();
|
||||
$table->integer('is_secure_with_ssl')->nullable();
|
||||
$table->integer('hosting_plan_id')->nullable();
|
||||
|
|
|
@ -18,7 +18,7 @@ return new class extends Migration
|
|||
|
||||
$table->string('provider')->nullable();
|
||||
|
||||
$table->integer('user_id')->nullable();
|
||||
$table->integer('customer_id')->nullable();
|
||||
$table->integer('is_active')->nullable();
|
||||
$table->integer('is_wildcard')->nullable();
|
||||
$table->integer('is_auto_renew')->nullable();
|
||||
|
|
Loading…
Reference in a new issue