Update trial plans

This commit is contained in:
= 2022-05-03 09:00:07 +10:00
parent d7d3c8d591
commit 623fbdb229

View File

@ -92,7 +92,6 @@ class NinjaPlanController extends Controller
]); ]);
$data['intent'] = $setupIntent; $data['intent'] = $setupIntent;
// $data['account'] = $account;
$data['client'] = Auth::guard('contact')->user()->client; $data['client'] = Auth::guard('contact')->user()->client;
return $this->render('plan.trial', $data); return $this->render('plan.trial', $data);
@ -139,6 +138,8 @@ class NinjaPlanController extends Controller
$account = Account::where('key', auth()->guard('contact')->user()->client->custom_value2)->first(); $account = Account::where('key', auth()->guard('contact')->user()->client->custom_value2)->first();
$account->trial_started = now(); $account->trial_started = now();
$account->trial_plan = 'pro'; $account->trial_plan = 'pro';
$account->plan = 'pro';
$account->plan_expires = now()->addDays(14);
$account->save(); $account->save();
} }