@foreach ($buttons as $button) @php $shouldShow = true; $href = '#'; $onclick = ''; $target = '_blank'; switch ($button['type']) { case 'driving': // $shouldShow = in_array($user->user_type, ['Gold', 'Platinum']); $onclick = 'openDrivingDirectionModal=!openDrivingDirectionModal;'; $target = ''; break; case 'zelle': $onclick = "openPaymentLinkModal=!openPaymentLinkModal;button_zelle=true;payment_value='{$button['link']}'"; $target = ''; break; case 'apple_pay': $onclick = "openPaymentLinkModal=!openPaymentLinkModal;button_apple_pay=true;payment_value='{$button['link']}'"; $target = ''; break; case 'paypal_email': $onclick = "openPaymentLinkModal=!openPaymentLinkModal;button_paypal_email=true;payment_value='{$button['link']}'"; $target = ''; break; case 'sms': $href = 'sms:' . $button['link']; break; // case 'podcast': // $href = $button['link']; // break; case 'email': $href = 'mailto:' . $button['link']; break; case 'phone': $href = 'tel:' . $button['link']; break; case 'help': $shouldShow = in_array($user->user_type, [ 'Basic', 'Sponsored', 'Influencer', 'Gold', 'Platinum', ]); $href = route('card.connect', $user->username); break; case 'exchange': $shouldShow = in_array($user->user_type, [ 'Basic', 'Sponsored', 'Influencer', 'Gold', 'Platinum', ]); $href = route('card.exchange', $user->username); break; case 'form': $slug = \App\Models\LeadCaptureForm::where('id', $button->form_id)->value('slug'); $shouldShow = in_array($user->user_type, ['Gold', 'Platinum']); $href = route('form.show', [$user->username, $slug]); break; case 'feedback': $shouldShow = in_array($user->user_type, [ 'Basic', 'Sponsored', 'Influencer', 'Gold', 'Platinum', ]); $href = route('card.feedback', $user->username); break; case 'bio': $shouldShow = in_array($user->user_type, ['Sponsored', 'Gold', 'Platinum']); $href = route('bio.show', $user->username); break; case 'shop': $shouldShow = in_array($user->user_type, ['Gold', 'Platinum']); $href = route('card.products', $user->username); break; case 'services': $shouldShow = in_array($user->user_type, ['Gold', 'Platinum']); $href = route('card.services', $user->username); break; case 'events': $shouldShow = in_array($user->user_type, ['Basic', 'Gold', 'Platinum']); $href = route('card.events', $user->username); break; // case 'sales': // $shouldShow = in_array($user->user_type, ['Gold', 'Platinum']); // break; case 'team': $shouldShow = in_array($user->user_type, ['Gold', 'Platinum']); $href = route('card.team', [$user->username, $button->id]); break; case 'zoom_replay': $shouldShow = in_array($user->user_type, ['Gold', 'Platinum']); $href = route('card.zoomreplay', $user->username); break; case 'reviews': $shouldShow = in_array($user->user_type, ['Gold', 'Platinum']); $href = route('card.reviews', $user->username); break; case 'trusted_network': $shouldShow = in_array($user->user_type, ['Platinum']); $href = route('card.trustednetwork', $user->username); break; case 'payments': $shouldShow = $user->user_type != 'Free'; $href = route('card.pay', $user->username); break; default: $href = $button['link']; break; } @endphp @if ($shouldShow)
  • {{-- Drag handle --}} {{--
    --}} {{-- Main button link with icon and label --}}
    @php $iconType = $button['type']; $iconBg = 'bg-red-500'; $iconMap = [ 'email' => 'bg-blue-500', 'phone' => 'bg-yellow-500', 'sms' => 'bg-indigo-500', 'venmo' => 'bg-[#008CFF]', 'credit' => 'bg-[#000000]', 'telegram' => 'bg-[#24A1DE]', 'whatsapp' => 'bg-[#25D366]', 'zalo' => 'bg-[#2196f3]', 'wechat' => 'bg-[#7BC142]', 'zoom' => 'bg-[#2d8cff]', 'apple_pay' => 'bg-[#A2AAAD]', 'zelle' => 'bg-[#6534D1]', 'cashapp' => 'bg-[#00CF31]', 'paypal_email' => 'bg-[#253B80]', 'paypal_link' => 'bg-[#253B80]', 'chime' => 'bg-[#1EC677]', 'square' => 'bg-white', 'zoom_replay' => 'bg-[#2d8cff]', 'amazon_shop' => 'bg-[#FF9900]', ]; if (isset($iconMap[$iconType])) { $iconBg = $iconMap[$iconType]; } @endphp @switch($iconType) @case('vcf') @break @case('form') @break @case('help') @case('exchange') @break @case('podcast') {{-- --}} @break @case('feedback') @break @case('bio') @break @case('shop') @break @case('services') @break @case('events') @break {{-- @case('sales') @break --}} @case('team') @break @case('square') @break @case('driving') @break @case('zoom_replay') @break @case('reviews') @break @case('trusted_network') @break @case('payments') @break @case('link') @break @case('community') @break @case('email') @break @case('phone') @break @case('sms') @break @case('venmo') @break @case('credit') @break @case('telegram') @break @case('whatsapp') @break @case('zalo') @break @case('wechat') @break @case('amazon_shop') @break @case('zoom') @break @case('apple_pay') @break @case('zelle') @break @case('payment_other') @break @case('chime') @break @case('cashapp') @break @case('paypal_email') @case('paypal_link') @break @endswitch

    {{ \Illuminate\Support\Str::limit($button['title'], 20) }}

    {{-- Controls --}}
    @if ($button->type !== 'form') @endif @if ( !in_array($button->type, [ 'vcf', 'help', 'exchange', 'bio', 'shop', 'services', 'feedback', 'events', // 'sales', 'team', 'driving', 'zoom_replay', 'reviews', 'trusted_network', 'payments', 'form', ])) @endif
  • @endif @endforeach