organization($request); $plans = app(PlanService::class); if ($plans->hasFeature($organization, $feature)) { return null; } $isEnterprise = $planHint === 'enterprise'; return view('care.settings.pro-feature', [ 'organization' => $organization, 'title' => $title, 'description' => $description, 'planLabel' => $isEnterprise ? 'Enterprise' : 'Pro', 'proPriceMinor' => $isEnterprise ? $plans->enterprisePricePerBranchMinor() : $plans->proPricePerBranchMinor(), 'upgradeBody' => $upgradeBody, ]); } /** * For mutations: redirect free-plan orgs to the plans page. */ protected function denyWithoutFeature( Request $request, string $feature, string $message, ): ?RedirectResponse { $organization = $this->organization($request); if (app(PlanService::class)->hasFeature($organization, $feature)) { return null; } return redirect() ->route('care.pro.index') ->with('upsell', $message); } }