From d448ae1119c05ab186d7924709e8ca8d1aba11dc Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 14 Jul 2021 17:15:59 +1000 Subject: [PATCH] fixes for trial_started --- app/Http/Controllers/CompanyController.php | 5 +++++ app/Models/Account.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/CompanyController.php b/app/Http/Controllers/CompanyController.php index a22091a218bf..913ce2d9564b 100644 --- a/app/Http/Controllers/CompanyController.php +++ b/app/Http/Controllers/CompanyController.php @@ -581,4 +581,9 @@ class CompanyController extends BaseController return $this->itemResponse($company->fresh()); } + + // public function default(DefaultCompanyRequest $request, Company $company) + // { + + // } } diff --git a/app/Models/Account.php b/app/Models/Account.php index cecd8847792e..5e2ea213798a 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -261,7 +261,7 @@ class Account extends BaseModel if ($trial_plan && $include_trial) { $trial_started = $this->trial_started; - $trial_expires = $this->trial_started->addSeconds($this->trial_duration); + $trial_expires = Carbon::parse($this->trial_started)->addSeconds($this->trial_duration); if($trial_expires->greaterThan(now())){ $trial_active = true;