@php $thisIcon = $embedLinkData['icon'][$index]; $thisLabel = $embedLinkData['label'][$index]; $thisLink = $embedLinkData['link'][$index]; $fieldValue = getWidgetCategories($thisLabel); try { $hrefPrepend = ''; $prependLinks = [ 'link' => '', 'email' => 'mailto:', 'phone' => 'tel:', // 'skype' => 'skype:', ]; if(isset($prependLinks[$embedLinkData['type'][$index]])){ $hrefPrepend = $prependLinks[$embedLinkData['type'][$index]]; } // $hrefPrepend = ''; // if($fieldValue['type'] == 'tel'){ // $hrefPrepend = 'tel:'; // } // if($fieldValue['type'] == 'email'){ // $hrefPrepend = 'mailto:'; // } } catch (\Exception $e){ $hrefPrepend = ''; } @endphp {{-- {{$fieldValue['label'] ?? 'label'}}--}} {{$thisLabel}}