session()->get('user.business_id'); } protected function contactId(): ?int { return auth()->user()->crm_contact_id; } protected function ensureCrmSubscription(): void { $this->ensurePortalAccess(); } protected function ensurePortalAccess(): void { $portal = PortalUtil::portalForUserType(auth()->user()->user_type); if (! $portal) { abort(403, __('portal::lang.portal_access_denied')); } PortalUtil::assertPortalAccess(auth()->user(), $portal); } protected function portalView(string $name, array $data = []) { return view($name, $data); } }