action === 'optin') { try { if ($optinToAdd = OptinConsent::query()->where('hashcode', $request->hashcode)->first()) { SingleOptin::setStatus($optinToAdd->email, true); $isSubscribed = true; } } catch (ValidationException | CrmException | ApiErrorException $e) { report($e); } } return view('fo.pages.newsletter-consent', compact('isSubscribed')); } }